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?