Drinking age on board is 21. It does not change by the ship's GPS coordinates.
Drinking age in most of the ports of call you'd ever visit on a Carnival cruise is 18 [by law; by practice it is frequently "old enough to walk into a bar and order a drink"].
This is not to suggest that you will get stringently carded while on board. If you act sneaky, like you're trying to pull a fast one, then yes, you might get carded. If you are going to be getting sloppy drunk and obnoxious, then you may get carded and tossed off the boat.
As a rule, I'd limit any under-21 drinking to port.
Desperately seeking 10th cruise for the free laundry.