Can an equivalence relation $C$ on $A$ relate two non-equal elements of a set $A$? I was working through one of the exercises in Topology: A First Course by Munkres, and I came across this:

Let $f : A \to B$ be a surjective function. Let us define a relation on $A$ by setting $a_0 C a_1$ if $f(a_0) = f(a_1)$. Show that $C$ is an equivalence relation.

Now essentially what this is saying is the following:
$$C = \{(a, b) : f(a) = f(b) \ \ \text{where} \ \  a,b \in A\}$$
But since $f$ is surjective and not injective we could have $f(a) = f(b)$ when $a \neq b$. But clearly by what we have above $aCb$, where $C$ is an equivalence relation on $A$. 
Is this an error or a misunderstanding on my part or can an equivalence relation relate two elements of a set that are not in fact equal to each other?

Yes, an equivalent relation can, and usually does, relate elements that are not originally equal to each other, generalizing what we know as equality.
Let us take, for instance, $\mathbb{Z}$ with the following equivalence relation: $x \sim y$ iff $x - y$ is even. With the above relation, we generalize the idea of "equality" saying that two numbers are "equal" if they are both even or both odd, e. g., $1 \equiv 3$.
