The error in the proof lies in the statement "... and take $y \in S$ such that $xRy$", as it assumes there is such a $y$, which we have no guarantee of.
As the rest of the proof is okay, this gives us guidance as to how to build a counterexample. There must be an $x$ that is not $R$-related to any other element.
Once you realize this, it's easy to build counterexamples, but the one that I think has the most simple, elegant statement (say for $\mathbb Z$ or $\mathbb R$) is "$xRy \iff x\cdot y \gt 0$." It's probably easier to see that this is a counterexample if you think of the condition "$x\cdot y\gt 0$" as "$x$ and $y$ have the same sign, but $0$ doesn't even have a sign".
A nice thing to notice is that if you remove $0$ from the set, you do have an equivalence relation. An even nicer thing to observe is that this is the only way such counterexamples arise. To wit,
Proposition: Let $S$ be a set, and $R$ a relation on $S$ that is both symmetric and transitive. Then we can write $S$ as a disjoint union, $ S = S_0 \cup S_1$, so that
(By "$R$ restricted to $S_0$" I mean $R \cap (S_0\times S_0)$, when we consider the relation $R$ as a subset of $S \times S$).
Proof: Define $S_0$ as $\{x \in S \mid \text{there doesn't exist }y \text{ such that } x R y\}$. As $R$ is symmetric, $S_0$ is also equal to $\{x \in S \mid \text{there doesn't exist }y \text{ such that } y R x\}$, and thus $R$ is the empty relation on $S_0$.
Setting $S_1 = S \setminus S_0$, we can see that for elements in $S_1$ the invalid "proof" presented in the question actually goes through, as elements in $S_1$ are $R$-related to at least one element. Q.E.D.
So we can generate all the counterexamples we want (and all the counterexamples possible) by taking an equivalence relation on some set, and then adding a bunch of new elements to the set and saying they are not related to any other elements, or even themselves.