I've two statements.
$(i)$ A lattice L is distributive if and only if it has no sublattice isomorphic to $M_3$ and $N_5$
$(ii)$ L is distributive if and only if $z ∧ x = z ∧ y$ and $z ∨ x = z ∨ y$ imply that $x = y$.
Why are these two statements equivalent?
First, consider to prove, or check some known proof, of the first statement.
You can find it (among many other places) in this book, Theorem 3.6, in the first chapter.
Now, you can easily find elements both in $N_5$ and in $M_3$ which violate that implication (you don't have to search much since they only have five elements each).
For the converse, it will be enough to prove that for every distributive lattice $L$, if for every $a,b,c \in L$, we have $a \wedge b = a \wedge c$ and $a \vee b = a \vee c$, then we also have that $b = c$. Now, under the conditions,
\begin{align} b &= b \wedge (a \vee b)\\ &= b \wedge (a \vee c)\\ &= (a \wedge b) \vee (b \wedge c)\\ &= (a \wedge c) \vee (b \wedge c)\\ &= (a \vee b) \wedge c\\ &= (a \vee c) \wedge c\\ &= c, \end{align} where I suppose you can justify each step.