You can carry it with you the entire time, and take it off the ship whenever the ship is in port, all without having to ask anyone. Of course, you don't really need to do this - your cruise card will get you off and back on the ship, and it's safest to keep your passport, as well as other valuables, in the cabin safe.