While it makes intuitive sense that a ship would be governed by the laws of the country in which it is registered, I am not sure that is true for all kinds of conduct. International law applies for some purposes while in international waters. Maritime law (which has both international and domestic components) governs much having to do with trade. I have tried to find some law on this (did this research with regard to airplanes which pose a similar problem) and this is a highly specialized area of the law. Remember that in the Gillette case, Delta argued that it was not bound by Vermont law because airplanes are regulated by the FAA and therefore only federal (and not state) law applies. While Gillette won that phase of the case (the commission held that state law applied because the plane was on the ground), this highlights how "what law applies" when not physically in a state or country is vexing - in part because breastfeeding mothers are rarely able to afford the lawyers required to litigate the cases which would help define the law.
So it is probably true that the law of the state or country at which the ship is docked applies while the ship is docked. However, for example, if you are injured on the boat when at sea, you almost certainly don't have to sue under the law of the Bahamas. Throw in here that much of how you are allowed to behave on ticketed travel is governed by the contract you enter into when you buy the ticket (that fine print no one actually reads).
The "discretion" response is obnoxious and unnerving.

But to some extent I wonder whether your safety when on the water is the same as when the plane is in the air - they are highly unlikely to toss you into the sea for breastfeeding.
