Let $R$ be a principal ideal domain, $p \in R$ be a prime element. Assume that $x^2+1 \equiv 0 \bmod p$ has a solution $i \in R$. Does it follow that there is some $u \in R$ such that $v_p(u^2+1)=1$? Here $v_p$ denotes the $p$-adic valuation. Equivalently, $u^2+1 \equiv p \cdot v \bmod p^2$ for some $p \nmid v$.
If $2$ is a unit in $R/p$, hence in $R/p^2$, then this is correct: Hensels Lemma gives a solution $i$ of $x^2+1 \equiv 0 \bmod p^2$. Then let $u=i(1-p/2)$ in $R/p^2$. Then $u^2+1=p$ holds in $R/p^2$.
If $p=2$, then we may take $u=1$.
This covers all cases for $R=\mathbb{Z}$.