The correct courtesy ensign in ANY foreign waters is always, without exception, the MERCANTILE nautical ensign of the host country. Thus a USA warship on a visit to the UK displays the Red Ensign. Dsanduril refers to the RYAs "opinion"; just for once, they are in the right! (The perceived difficulty is that, for historical reasons, the UK has no fewer than 3 nautical ensigns - white, blue, red - and they are sometimes defaced, as well - whereas many other countries make no distinction between their national flag as used on land and that as used at sea). And why do we display courtesy flags
? The answer is again, historical. In years gone by, any vessel displaying only her national colours in foreign waters could be construed as showing warlike intentions. Use of the courtesy flag says to a Frenchman, "I'm a Brit/German/Yank/whatever, (shownby my national colours), but I come in peace as a guest (shown by the courtesy flag)"