Consider this statement:
$ax \equiv 1 \pmod n\,$ has a solution iff $\gcd(a,n) = 1$.
Let $a = 1, n = 1$. Then $\gcd(1,1) = 1$ but no solution exists.
Consider this statement:
$ax \equiv 1 \pmod n\,$ has a solution iff $\gcd(a,n) = 1$.
Let $a = 1, n = 1$. Then $\gcd(1,1) = 1$ but no solution exists.
Consider the fact that, for instance, $6\equiv 4\pmod 2$ (i.e. modulo is not an operation in this context). Then apply that thinking to modulo $1$ and see that your problem isn't a problem: $ax\equiv 1\pmod 1$ comes automatically.