Close! Your proof shows that if $ord_p(a) = d$ then $ord_p(a^i) \mid d$, since there could be some smaller $k \mid d$, $k < d$ such that $a^{i k} \equiv 1$. To finish, you can argue that $a^{ik} \equiv 1$ implies $d \mid ik$ since the order of $a$ is $d$. But $(i,d) = 1$, so $d \mid k$, and hence $d = k$. So the order of $a^i$ is $d$.
For a more concrete example of why this extra argument is necessary, notice that your proof didn't use the fact that $(i,d) = 1$ anywhere. So consider $a=3$ mod $7$. Then you can check that $ord_7 (3) = 6$, and try $i=3$. Importantly, $(3,6) \neq 1$. We have $3^3 = 6$, and clearly the order of $6$ is $2$.