In my abstract algebra book, it says that an element $p \in R$ where $R$ is a commutative ring is irreducible if
$\textbf{(i)}$: $p$ is not a unit $\textbf{(ii)}$: if $p=ab$ then either $a$ or $b$ is a unit of $R$.
However, in another book when $R$ becomes an integral domain, they give the definition that en element $p$ is irreducible if $a \mid p$ implies that either $a$ is a unit or an associate of $p$.
To me it seems like the statement " $a \mid p$ implies that either $a$ is a unit or an associate of $p$." is totally equivalent to $\textbf{(ii)}$. My question is, does $\textbf{(ii)}$ imply $\textbf{(i)}$ in an integral domain? So that in an integral domain we can shrink the definition of an irreducible element?