I think your confusion may stem from differing uses of terminology.
For a function $f: X \rightarrow Y$, the codomain is just the set $Y$. For instance, if $f: \mathbb{R} \rightarrow \mathbb{R}$ is $x \mapsto x^2$, then the codomain is $\mathbb{R}$. This terminology is agreed upon by all who use it: i.e., I have never seen anyone use the term "codomain" to mean anything else.
Unfortunately the term range is ambiguous. It is sometimes used exactly as codomain is used above, so some say that $\mathbb{R}$ is the range of the squaring function defined above. However, those who use the term codomain at all usually reserve the term "range" for the subset $\{y \in Y \ | \exists x \in X \text{ such that } f(x) = y\}$, i.e., the subset of values which are actually mapped to by some element in the domain. (Some others use the term image for this instead.) So in the above example the image of the function is $[0,\infty)$. Whether the range is $\mathbb{R}$ (i.e., the codomain) or $[0,\infty)$ (i.e., the image) depends upon your convention, and both are rather prevalent.
In practice, this means that it would be safest never to use the term range, instead using codomain and image. (But most people don't do that either...)
The remarks on the distinction between function and relation are now correct, however the way the proof runs, relations are not involoved, only functions. I'll say a few things about your last paragraph:
"Thus, I don't apprehend the block quoted sentence in the proof of
Theorem 13.7. How can x NOT be an element of f(x)? By Definition 12.1,
isn't every x∈A always mapped by f?"
In one sense, it is usually the case for functions that $x$ is not an element of $f(x)$. For example given $f(x)=x^2$ we would say that $2$ is not an element of $f(2)=4$, since under a simple interpretation numbers are not regarded as sets. Even in the case $f(1)=1$ we wouldn't say that $1 \in 1$, again since in a simple interpretation $1$ is not a set.
[Note: there is a "logic" interpretation of nonnegative integers in which each integer is the set of its predecessors, so that e.g. $4=\{0,1,2,3\}.$ With this view, one does have $x \in f(x)=x^2$ when $x=2$, since $2$ is a predecessor of $4$. But this logic interpretation would say for example that $1$ is not a member of $f(1)=1$ since $1=\{0\}$ in this "logic" interpretaion. A restriction of this logic interpretation is that it doesn't associate sets to real numbers other than nonnegative integers.]
So if you have, as in this proof, a context in which the question whether $x\in f(x)$ even makes sense to ask about specific $x$ in the domain, it at least should be the case that for $x$ in the domain the image of $x$ under $f$ should be a set. That is, if $A$ is the domain of $f$ then for each $a\in A$ the image $f(a)$ is a set, in the proof here the codomain of $f$ consists of the collection of subsets of $A$, and these are sets, so that asking if $x \in f(x)$ for specific $x \in A$ at least makes sense.
The final question of the quoted part above, "By Definition 12.1, isn't every $x \in A$ always mapped by $f$?" has the answer "yes", simply because to say $x$ is "mapped by $f$" only means that it is mapped to something. And since $A$ is the domain of $f$, naturally any $x$ in $A$ does get mapped to something.
The question is, in the setup of the proof where one has assumed the existence of a map $f:A \to P(A)$ which is onto, whether a given $x$ in $A$ happens to map to a subset $f(x)$ of $A$ for which it happens that $x \in f(x).$
Here's a simple example in which $A=\{1,2,3\}.$ Suppose $f(1)=\{1,2\}$, $f(2)=\{3\}$, and $f(3)=\{1\}.$ In this case, we have $1 \in f(1)$ but $2 \in f(2)$ and $3 \in f(3)$ are each false.
The point of the proof is that, no matter how one sets the map $f$ up, it cannot wind up being an onto map from $A$ to the power set $P(A)$. Other answers (and the text you quote) have already covered this. I'm only throwing these thoughts into an answer because you expressed in comments some remaining confusion about the situation, and hope this sheds some light on that.
Added material re. query in question supplement Jan 4.
I can't pinpoint why I still think $\color{#009900}{[ a \in A ] \in f(a)}$.
Don't the green parts of Velleman's definition above mean and
reveal $\color{#009900}{[ a \in A ] \in f(a)}$? What am I
misreading/misconceiving?
I think what you have is a confusion between the technical definition of $f$ as a collection of ordered pairs, as opposed to the notation $f(a)$, which refers to the (unique) second coordinate of the pair $(a,b) \in f$. From the definition, for each $a\in A$ there's a unique $b\in B$ for which $(a,b) \in f$, and the notation $f(a)$ is then used to denote that particular $b$. Note that $b$ is not in $f$, since $b$ is merely the second element of an ordered pair in $f$.
If one looks at the particular pair $(a,b)$ as it occurs in the technical definition of $f$ as a collection of ordered pairs, and replaces $b$ by $f(a)$, what we have is that
$$(a,f(a)) \in f.$$
But one must keep in mind that in this statement $f$ is a collection of ordered pairs. If say I have the function $f=\{(1,7),(2,4)\}$ we can say that $(1,f(1))=(1,7)\in f.$ But we cannot say that $7 \in f$ because $7$ is not one of the pairs $(1,7),(2,4)$ which are the only two things in $f$. All we can say is that $7$ is the second coordinate of one of the pairs in $f$.
For usual functions, in which domain and range are collections of numbers, this confusion would be unlikely. My guess is that, in the present case where the range is a collection of sets, one might be tempted to think $f(a) \in f$ always. But the same thing happens, e.g. if $(2,\{1,2,5\}) \in f,$ we still cannot say $f(2) \in f$, only that $f(2)$ is the second coordinate of a pair in $f$.
I hope this clears up the supplementary question.
Best Answer
By definition, the domain of a function $f$ is the set of elements which are "sent out" by $f$, so this is not possible.