Suppose we have $a^2 \equiv b^2 \bmod 4R$ where $R$ is an integral domain. Under what conditions on $R$ can we conclude that $a \equiv b \bmod 2R$?
This would hold if $2 \in R$ is a prime or the product of distinct comaximal primes. This can fail when $R$ is not integrally closed: For $R = \mathbb{Z}[\sqrt{-3}]$ we have $(4+\sqrt{-3})^2 \equiv 1^2 \bmod 4R$ but $4 + \sqrt{-3} \not\equiv 1 \bmod 2R$.
Does this hold in a GCD domain? Does it hold, more generally, in an integrally closed domain?