Hint $\rm\ x^2\! =\! 1\!\iff\! (x\!-\!1)(x\!+\!1) = 0\! \iff\! x = \pm1,\:$ by $\rm\:ab=0\:\Rightarrow\: a=0\:\ or\:\ b=0\:$ in a field.
This may fail if the latter property fails, i.e. if nontrivial zero-divisors exist. Consider, for example, $\rm\ x^2 = 1\:$ has $4$ roots $\rm\:x = \pm1, \pm 3\:$ in $\rm\:\mathbb Z/8 = $ integers mod $8,\:$ i.e. $\rm\:odd^2 \equiv 1\pmod 8$.
Rings satsifying the latter property (no zero-divisors) are called (integral) domains. They are characterized by a generalization of the above, viz. a ring $\rm\: D\:$ is a domain $\iff$ every nonzero polynomial $\rm\ f(x)\in D[x]\ $ has at most $\rm\ deg\ f\ $ roots in $\rm\:D.\:$ For the simple proof see my post here, where I illustrate it constructively in $\rm\: \mathbb Z/m\: $ by showing that, given any $\rm\:f(x)\:$ with more roots than its degree,$\:$ we can quickly compute a nontrivial factor of $\rm\:m\:$ via a $\rm\:gcd$. The quadratic case of this result is at the heart of many integer factorization algorithms, which try to factor $\rm\:m\:$ by searching for a nontrivial square root in $\rm\: \mathbb Z/m,\:$ e.g. a square root of $1$ that is not $\:\pm 1$.