When I asked the What are the Laws of Rational Exponents? question on SE Mathematics, I was largely thinking about this context; teaching at the level of high school or early (remedial) college math. While it wasn't the top-voted, my answer there represents my best thinking about the status of this issue in classes at that level. As I wrote:
Regarding the example in the question, most everyone agrees that
$(-1)^{2 \cdot \frac{1}{2}} \ne ((-1)^2)^\frac{1}{2}$, if both sides
are simplified in the standard order of operations; and this
highlights the fact that the identity $(a^r)^s$ = $a^{rs}$ is not true
unrestrictedly. Exactly what restrictions need to be honored depend on
the definitions in use in a particular textbook.
Just to expand on the last line there; part of the conversation around these questions usually dredges up the fact that there is a standard definition for fractional exponents in real-numbers, and another one in complex-numbers, and that these two definitions actually disagree with each other (e.g.: the value of $(-8)^{1/3}$, on which numerous academic articles have been written). As a result, real-number theorists and complex-numbers theorists have a tendency to start arguing with each other on these questions.
So: I assume you are working from some standard textbook. That textbook must have some restrictions around the $(a^m)^n = a^{mn}$ identity (although they vary between books and contexts). I would recommend you read your book very carefully, note the restriction used there, and apply it conscientiously in your classroom practice.