I think the ticket contract is clear that masks may be required, along with other measures. One example:
(c) Guest acknowledges that Carnival’s COVID-19 Guest Protocols may or will include (but are not be limited to): (1) completion of an accurate, truthful and complete health questionnaire in a form and containing any health or travel-related questions as determined by Carnival in its sole discretion based on advice from cognizant government or health authorities or medical experts for each Guest prior to boarding; (2) pre-embarkation and/or periodic testing and temperature checks of each Guest followed by a period of isolation until test results are available; (3) modified capacity rules for activities (including but not limited to restaurants, gyms, and entertainment events on board and for shore excursions) which may limit or eliminate the ability of Guest to participate in particular activities; (4) mandatory use by each Guest (except for children under the age of 2 years) of face masks in most locations outside of the Guest’s stateroom while on board, during embarkation, disembarkation and shore excursions; (5) mandatory physical distancing of Guests outside of their cruise companions (family and/or immediate travel group) at any/all times while on board and during embarkation, disembarkation, and shore excursions; (6) additional restrictions during shore excursions depending on local conditions, including but not limited to denial of disembarkation at destinations unless participating in only Carnival-approved shore excursions and denial of reboarding the vessel for any noncompliance by Guest or members of Guest’s travelling party with COVID-19 Guest Protocols; (7) mandatory hand-sanitizing by Guests upon entry or exit of any public areas; (8) confinement of Guests to staterooms, quarantine or emergency disembarkation of Guest if, in Carnival’s sole discretion, such steps are necessary to prevent or slow the spread of COVID-19; (9) the required completion by Guest in a timely manner of any written authorizations or consent forms required for Carnival to carry out its COVID-19 Guest Protocols (including but not limited to medical information, medical privacy, or personal data privacy consent forms), (10) vaccination of guests with documentary proof satisfactory to Carnival, according to the criteria set forth in the COVID-19 Guest Protocols in effect at the time of sailing; and; (11) other policies and procedures deemed by Carnival in its sole discretion to be necessary to reduce the risk of spread of COVID-19.