Let $a,b,q,m$ positive integers. Assume that $ab\equiv 1\pmod{m}$. Is it true that $a^q\not\equiv 0\pmod{m}$?
My approach: If $a^q\equiv 0\pmod{m}$, then $a^qb\equiv 0\pmod{m}$ and so $0\equiv aba^{q-1}\equiv a^{q-1}\pmod{m}$ and so, iteratively, $a\equiv 0\pmod{m}$, which contradicts that $ab\equiv 1\pmod{m}$.
Is this correct? Is there a more immediate way to see that the above claim must be true?
I would do it this way since it is very straightforward. For any integer $q$, we must have $$(ab)^q \equiv a^q b^q \equiv 1 \mod m.$$ If $a^q \equiv 0$, then we can write the above as $$0 = 0 b^q \equiv 1 \mod m,$$ which is a contradiction. So we can't have $a^q \equiv 0 \mod m$.