I was on a job where the fan got installed above the tub (wasn't me ). Inspector didn't make us move it... and he doesn't miss much.
I wouldn't install one in a tub, but I also wouldn't relocate one out of a tub either, unless I was told to by customer or inspector. Are you good at drywall?
So, if a bathtub area is considered a class 1 location, then any equipment installed in the tub would have to be drip proof, weatherproof, watertight. But one could argue that the fan is actually in the attic....
Fan grills are designed to minimize splashing aswell.