For a field, $A\neq 0$ is a zero divisor if and only if it is not invertible.
If $A$ is not invertible, then let $P$ be the projection onto the eigenspace of $A$ corresponding to $0$. Then $P\neq 0$, since the eigenspace is nontrivial, but $AP=0$. And letting $W$ be any complement to $\mathrm{Im}(A)$ (which is nontrivial by the Rank-Nullity Theorem), and letting $Q$ be the projection onto $W$ along $\mathrm{Im}(A)$ gives $QA=0$, so $A$ is a zero divisor. Conversely if $A$ is a zero divisor, then it is not a unit.
Thus, $A$ is a zero divisor if and only if $A$ is not invertible, if and only if $\det(A)=0$.
For $R$ an integral domain, look at $A$ as a matrix over $Q(R)$, the fraction field of $R$. It's still a zero divisor over $Q(R)$, hence its determinant is zero by the argument above.
Added. The converse also holds over an integral domain (it holds in fields, as noted above): if $\det(A)=0$, then working over $Q(R)$ you can find a matrix $P$ and a matrix $Q$ with coefficients in $Q(R)$ such that $QA = AP = 0$. Though these matrices may not lie in $R$, multiplying them by a suitable scalar will make them lie in $R$: just express each entry as a fraction $\frac{a}{b}$ with $a,b\in R$, and multiply by the product of all denominators. Though there may not be unique expressions (even unique reduced expressions), simply pick one expression for each entry and use it.