Proving every inverse is in Aut($\mathbb{Z}_n$). Let $\pi_i: \mathbb{Z}_n \rightarrow \mathbb{Z}_n$ be a homomorphism defined by $\pi_i(g)=ig \;$.
Let Aut($\mathbb{Z}_n$) be the set of automorphisms on $\mathbb{Z}_n \;$. Then if $\pi_i \in$ Aut($\mathbb{Z}_n$), gcd$(i, n) = 1 \;$.
If I understand correctly, to prove an element, say $\pi_a \in$ Aut($\mathbb{Z}_n$), has an inverse, I simply need to prove there is another element $\pi_m \in$ Aut($\mathbb{Z}_n$) such that $ma\equiv 1$ mod $n \;$, and we can use Bezout's identity to help find such an $m$. We can then use this $m$ to satisfy an equivalence $m\equiv l$ mod $n$ where $l \in \mathbb{Z}_n$.
My question is: how do we know gcd($l, n) = 1 \;$, so that we know $\pi_l \in$ Aut($\mathbb{Z}_n$) too?
 A: The way you stated the problem: If $\pi_i\in \mathrm{Aut}(\mathbb{Z}_n)$ then $\gcd(i,n)=1$.
One confusion You say: "If I understand correctly, to prove an element, say $\pi_a \in$ Aut($\mathbb{Z}_n$), has an inverse, I simply need to prove there is another element $\pi_m \in$ Aut($\mathbb{Z}_n$) such that $ma\equiv 1$ mod $n$." But the problem you are given is not about proving $\pi_a\in \mathrm{Aut}(\mathbb{Z}_n)$, on the contrary, that is your hypothesis! You seem to be trying to prove the converse statement.
I suggest you prove the negation: If $\gcd(i,n)=d\neq 1$ then $\pi_i$ is not injective.
That being said, the converse statement: If $\gcd(i,n)=1$ then $\pi_i\in \mathrm{Aut}(\mathbb{Z}_n)$ is also true. And your idea of finding $j$ such that $ij\equiv1\mod{n}$ is also completely on point. However, I suggest you take a slightly different approach to finding $j$:
Hint: If $\gcd(i,n)=1$, then prove that there exists $1<k<n$ such that $i^k=1\mod n$. Use this to construct your $j$.
The converse statement can also be proven more directly and simply by just showing if $\pi_i$ is injective if $\gcd(i,n)=1$.
