Euclid's lemma: Let $A$ be a principal ring with $x$ and $y$ belonging to $A$, and $p$ an irreducible element of $A$. If $p$ divides the product $xy$, then $p$ divides $x$ or $p$ divides $y$.
Definition of irreducible element: A non zero element p is said to be irreducible in A (where A is an integral domain) if p is non invertible in A and all divisors of p in A are trivial. In other words a nonzero element p of A is irreducible iff p is non invertible and the only divisors of p in A are the invertible elements of A and the elements associated to p.
Question: Should $A$ be an integral domain too? And I need a justification why please. I'm not quite grasping why an integral domain can help with such lemmas.