# gcd's in non-UFD rings

In a UFD ring we have that for coprime $a,b \in R$, i.e. $(a,b)=1$:

$$a|cb \Rightarrow a|c$$

Does this property hold for non-UFD rings? I think not but do not recall a standard counter-example.

NOTE: In a non-UFD ring the elements $a,b$ may not even have a gcd, but I am assuming here they do have one.

As mentioned, this version of Euclid's Lemma is true in any ring if $\,(a,b) = 1\,$ is interpreted as an ideal equality, i.e. that $\,(a),(b)\,$ are comaximal. But I think you probably intend $\,(a,b)=1\,$ to mean $\,\gcd(a,b)=1,\,$ i.e. $\,d\mid a,b\,\Rightarrow\,d\mid 1.\,$ Then $\,a\mid bc\,\Rightarrow a\mid c\,$ yields, when $\,a\,$ is an atom (irreducible), that atoms are prime, so the domain is a UFD, assuming every nonunit $\ne 0$ has a factorization in atoms. Conversely any UFD satisfies Euclid's Lemma because it is an immediate consequence of the uniqueness of prime factorizations.
As for counterexamples, any domain with a nonunique factorization will have a non-prime atom $\,a\mid bc,\,\ a\nmid b,c,\,$ which yields a failure of Euclid's Lemma, e.g. $\ 2\mid \alpha \alpha',\ \alpha = 2+\sqrt 5\,\in\,\Bbb Z[\sqrt{-5}].\,$ As I elaborate here this immediately yields a nonexistent gcd, and a nonprincipal ideal. See also this answer for over $15$ closely related properties which all imply uniqueness of atomic factorizations.