Definition 1 is not correct*. The requirement $a \neq 0$ needs to be omitted. Notice that $0$ is a zero divisor iff the ring is non-trivial.
Equivalently, $a \in R$ is called regular when $R \to R$, $x \mapsto xa$ is injective, and $a$ is called a zero-divisor when it is not regular. It is not useful to exlude the $0$ from this general definition.
Also, Definition 1 is only correct for commutative rings. In the non-commutative case, we have to distinguish between left and right zero divisors (same with regular elements).
Definition 2 is not correct* either. A commutative ring is an integral domain iff it is non-trivial and $0$ is the only zero divisor. The zero ring is therefore not an integral domain.
There is a neat reformulation where the non-trivial follows: Let us call $R$ an integral domain if for all finite sequences $a_1,\dotsc,a_n \in R$ we have $a_1 \cdots a_n = 0 \implies \exists i \quad (a_i = 0)$. Apply this to $n=0$, the empty sequence. This yields $1=0 \implies \bot$ (where $\bot$ is the falsum). In other words, $1 \neq 0$.
*in the sense of: inconvenient, non-standard, not useful. Of course you can make any definition you like, even $\pi := 3$ if you want, but this is not correct in the sense just explained.