The ring $\mathbb{Z}[\sqrt{-5}]$ is the easiest example of a domain that lacks unique factorization.
Anyway, if an element $a$ is irreducible and $b$ is a divisor of $a$, then, by definition of irreducible element, either $b$ is invertible or is associate to $a$.
Hence, yes: it suffices to show they don't divide each other.
It's not really necessary to show they're irreducible, though. Suppose $2=ax$ and $1+\sqrt{-5}=ay$. Then, denoting by $N$ the norm function, we have $$ 4=N(a)N(x),\qquad 6=N(a)N(y) $$ so either $N(a)=1$ or $N(a)=2$. However, $N(p+q\sqrt{-5})=p^2+5q^2\
e2$. Hence $N(a)=1$ and $a$ is invertible.