Alcohol is 100% illegal outside resorts for everyone. If you're an American or from any western country I assume they wouldn't stop you from drinking regardless of your name as long as you were only doing this in the resort.
It would seem their laws specifically are for citizens of the Maldives and not Muslims in general, only non-citizens have freedom of religion and only in private. Muslims generally don't work at all in the resorts, they seek to import workers for the resorts so the citizens are not exposed to the sins taking place there(bikinis, alcohol, pork).
On a public beach a woman has to be completely covered; at a resort a woman could be in a bikini.
The only place you will be drinking is your own resort.
Sharia law does not exist in the resorts. The resort islands are uninhabited beyond the hotel complexes, and most of their employees are Bangladeshi immigrants.
That said, I wouldn't speak Arabic in front of them or they might have an issue with you drinking and it might be uncomfortable for you.
The resorts are very isolated from the general public, the laws for locals do not extend there. In the Maldives in public you should expect the same as Iran. One day, all the resorts might get shut down. I don't see this type of resort in Iran. They do want the tourist dollars. You will be generally confined to your resort and not around local people at all.
I could not find a specific link to the thing about the citizens and not muslims in general, but all their laws seem focused on citizens and citizenship. If you decide to switch religions, you lose your citizenship. "Expulsions of Christians occurred several times in the last 10 years." I note that this says "Expulsions" and not "executions". All of this information points to the conclusions that inside the resorts you can do what you want and no citizens are allowed there.