Question is to find a condition when can be $\mathbb{Z}_p$ has an $m$th root.
First non trivial and simple root of unity is fourth root of unity $m=4$.
So, we want to know when does $f(x)=x^2+1$ has solution in $\mathbb{Z}_p$.
Suppose it has then it has to be of the form $x=a_0+a_1p+a_2p^2+\cdots$ i.e., we have $$\sqrt{-1}=a_0+a_1p+a_2p^2+\cdots$$
Squaring and going modulo $p$ we have $-1\equiv a_0^2\mod p $
Special case when $p=5$ we have $a_0=2$.
Special case when $p=3$ we have no solution.
I observe that this boils down to the question
Given prime $p$, which roots of unity does $\mathbb{F}_p$ contain?
I guess it is sufficient to look for $a_0$. Once we find $a_0$ then $a_i$ for $i\geq 1$ exists automatically.
In a word, $\Bbb Q_p$ has no $p$-th roots of unity, except for $p=2$. Beyond that, the torsion in the multiplicative group is exactly isomorphic to the multiplicative structure of $\Bbb F_p$: cyclic of order $p-1$. So, to answer your question, you only need look at the relationship between $m$ and $p-1$.