In the US, if you are on a boat, there has to be a sober person in command at all times, even at anchor. The reality is that boats slip anchorages all the time, and there has to be someone who can command the vessel if that occurrs. The cg and most leos don't give any slack on this rule.
About the only exception is if you are tied to the dock and no obvious plans to make way have been made.
Same goes for vehicles. If you are in the car and have the keys you can be busted for dui even if the car isn't running. You are assumed to be in control of the vehicle and that is enuf.