[Update OP revealed the source as Rudin's PMA. Despite prior doubts in the comments below, my (surmised) analysis below turns out to be essentially what was intended - cf. Note below].
The proof is valid in any field $K$ (though it might be circular depending on the context). Namely, $\,0\ne x,y\in K\,$ $\Rightarrow$ $\, 1/x,1/y\in K\,$ $\Rightarrow$ $\,(1/x)(1/y) = 1/(xy)\in K\,$ $\Rightarrow$ $\,xy\ne 0\,.$ The OP's proof is simply this proof recast into a proof by contradiction, as below:
as above $\, x,y\ne 0\ \Rightarrow\ z := 1/(xy)\in K,\,$ i.e. $\,xyz = 1.\,$ So $\ xy=0\, \Rightarrow\, 0 = 1,\,$ contradiction.
That's precisely the OP's proof, except I replaced $\,xy/(xy)\,$ by $\,xyz\,$ to avoid possible confusion.
This is a valid proof. The confusion stems from the fact that it is a proof by contradiction. Such proofs - by their very nature - may encounter all sorts of strange looking mathematical objects, such as the above expression of the form $\, 0/0 = 1.\,$ This is just $\,1/1 = 1\,$ in this trivial ring $\,\{0\}\,$ where $\,0 = 1.\,$ However, the trivial ring is not a field, since $\,0\ne 1\,$ by the definition of a field (or integral domain). So, as above, $\,0 = 1\,$ is a common target for proofs by contradiction in a field.
Proofs by contradiction often prove immensely confusing to students when first encountered. Learning to wrap one's mind around the bizarre contradictory objects encountered in such proofs is skill that comes with practice. A striking example of such confusion is Euclid's classical proof that there are infinitely many primes. Although Euclid's proof was constructive, it is widely presented as a proof by contradiction (and falsely claimed that this was Euclid's proof).
When Euclid's proof is presented by contradiction it often leads to much confusion. We can reach all sorts of contradictions to terminate Euclid's proof, e.g. $\,1 = 0\,$ or $\, 1\,$ is prime, or some integer is both prime and composite, etc. Indeed, by explosion we can deduce anything in a contradictory theory such as the integers with finitely many primes. There are hundreds of threads on sci.math permeated by such confusion, e.g. thread$_1$ & thread$_2$ & thread$_3$.
Such contradictions often prove too much to grasp for many beginners. Apparently this is because we have such strong intuition about integers that one contradiction easily implies many others, and this quickly grows too much to handle intuitively. This does not occur to the same degree when we work with more abstract structures, where real-world intuition has less chance to restrain logical thought processes. Such is the strange nature of proofs by contradiction.
Note $ $ The OP later revealed the source as Proposition $1.16$ in Rudin's Principles of Mathematial Analysis. I've appended it below. It is essentially as I surmised above.