# A non-UFD such that $a^2 \mid b^2$ does not lead to $a\mid b$

Is there any non-UFD that is a commutative ring such that $a^2 \mid b^2$ does not always lead to $a\mid b$?

It would be preferable if examples are something that does not involve monomials/polynomials, and there are some integer parts in the non-UFD (for example, gaussian integers have integer parts, though gaussian integer is UFD).

Let $\,a = 2,\ b=\sqrt{12}\,$ in $\,\Bbb Z[\sqrt{12}]$
Let $a=4$, $b=8$ in $4{\bf Z}$.