Any ship needs to fly the flag of a country. They do so by registering with a country, following the United Nations Convention on the Law of the Sea. By doing so, the ship has to follow the laws of the registered country.
If a ship or submarine does not register to any country, I think most coast guards will assume it to be pirates or drug smugglers. And they will probably surrender and arrest anyone on board or sink you if it comes to that.
Yeah, and there will always be a country willing to let you do anything short of actual piracy under their flag, maybe for a fee. There’s no world government, thank goodness.
A cruise ship is on international water but there are still strict laws about what cruise ships can operate at US ports or can advertise to US consumers.
If a ship or submarine does not register to any country, I think most coast guards will assume it to be pirates or drug smugglers. And they will probably surrender and arrest anyone on board or sink you if it comes to that.