Anna,
I am sure the officer was right, about naval officers being encouraged to learn foriegn languages. I am sure it has been found useful in Nato exercises for example and in foriegn visits. (Perhaps he also said that with a view to the recent news of 'carrier sharing'!

)
In the past, I can imagine that speaking French (or Spanish, or even Russian) might have come in handy when dealing with foriegn navies, for example when an enemy ship were taken and there were prisoners, which in the case of the officers at least was usually a very gentlemanly affair. I'm not sure it would have had any effect on promotion, but a knowledge of French would certainly have proved useful especially as I believe it was considered the language to learn, other then your own, in most of Europe.
A case in point here is that of Sir James Saumarez. Being a native of Guernsey, he could speak fluent French, which attribute stood him in good stead throughout his career and especially during his time in the Baltic. He couldn't speak Swedish himself, nor could many Swedes speak English, but the one language they had in common was French, which came to be the one through which they communicated. Some of Saumarez' officers, such as John Ross, went on to learn Swedish which became an undoubted asset.