In $a^n \equiv b^n \pmod m$, does $n$ have to be an integer? 
In $a^n \equiv b^n \pmod m$, does $n$ have to be an integer?

I just came upon this rule and am wondering its limits. Thank you

As long as $a^n$ and $b^n$ are integers, there is nothing new.
I don't think that anything forbids to extend the definition of the modulo to non-integer numbers and say
$$a\equiv b\mod m\iff \frac{a-b}m\in\mathbb Z.$$
Then, 
$$2^{1/3}\equiv(15\sqrt[3]4+75\sqrt[3]2+127)^{1/3}\mod 5,$$
$$2^\pi\equiv \left((2^\pi+3e)^{1/\pi}\right)^\pi\mod e.$$
