Suppose M is the multiplicative set consisting of all elements which are not zero divisors I am proving that every element of $M^{-1}R$ is either a zero divisor or a unit.
Here is my proof:
Suppose $[\frac{x}{y}]$ isn't a zero divisor or 0 element in the ring. This means $x \neq 0$. Also, we have the property that for all $[\frac{k}{m}] \neq [\frac{0}{1}]$ we have $[\frac{x}{y}][\frac{k}{m}] \neq [\frac{0}{1}]$. In particular we have that $[\frac{x}{y}][\frac{y}{x}] \neq [\frac{0}{1}]$. Then, $[\frac{xy}{yx}] = [\frac{1}{1}]$, as one can easily verify.
 A: To be able to write $[\frac{y}{x}]$, you must have first shown that $x$ is not a zero divisor.
But it is easy to rule that out: if $xz=0$ for some nonzero $z$, then compute $[\frac{x}{y}][\frac{z}{1}]$.
You could also pursue the problem this way, since the set of regular elements (= non zerodivisors) is closed under multiplication:
$\frac{x}{y}$ is regular $\iff \frac{x}{y}y$ is regular $\iff x\in M\iff \frac{x}{y}$ is a unit (having inverse $\frac{y}{x}$ as you wanted.)
A: When we localize at the set of non zero divisors, equality of two fractions is easier than in other localizations: by definition, for $a,b\in R$ and $s,t\in M$,
$$
\frac{a}{s}=\frac{b}{t}
\quad\text{if and only if}\quad
(at-bs)u=0\text{, for some $u\in M$}
$$
However, since $u\in M$ is a non zero divisor, $(at-bs)u=0$ is the same as $at-bs=0$.
Now the argument is clear: if $\frac{a}{s}$ is a zero divisor, there is $\frac{b}{t}\ne\frac{0}{1}$ (in particular $b\ne0$) with $\frac{a}{s}\frac{b}{t}=\frac{0}{1}$, that is, $ab=0$, therefore $a$ is a zero divisor. The converse is easy: from $ab=0$, we get $\frac{a}{s}\frac{b}{1}=\frac{0}{1}$, with $\frac{b}{1}\ne\frac{0}{1}$.
Hence $\frac{a}{s}$ is a zero divisor if and only if $a$ is a zero divisor. If $a$ is not a zero divisor, then $\frac{a}{s}$ is invertible, for every $s\in M$.
