Suppose algorithm $A$ on a digital computer takes as input integers $x$ and $y$ in binary. The algorithm outputs one if $x=y$, and zero if $x \neq y$. Is there a proof that for any input $x$ and $y$ in which $x=y$, there exists a one-to-one function $f: \mathbb Z \rightarrow \mathbb Z$ such that $A$ compares all of the bits of $f(x)$ to all of the bits of $f(y)$?
There is a problem with your question because it is ill-posed.
First, in your question you talk about a function $f$ as if a Turing machine somehow operates with functions and can "use" such an $f$ during its execution. This is not the case. A Turing machine operates with tapes and heads, and it has states, and a transition function. So you need to carefully explain what it means for the machine to "compare bits of $f(x)$ and $f(y)$". Do you claim that the machine will write down $f(x)$ and $f(y)$ onto a tape at some point? What if it encodes the least significant bit of $f(x)$ and $f(y)$ in its state, and it writes down the rest onto a tape?
Second, there is no instruction corresponding to "compare bits". Even if we add one to the Turing machine, the machine can avoid using it and still effectively compare bits. It is also possible to compare bits in ways that are not easily recognizable as such. So the whole notion of "compare bits" is ill-formed, at least for the traditional notion of Turing machine.
It is possible to make your question precise in several ways. For example, we could devise a "comparison network" that consisted of wires and equality tests, much like the sorting networks use comparisons. Then we could ask about the structure of a comparison network that correectly compares numbers.
Another way to make your question precise is to avoid talking about "comparison of bits", and instead ask whether the machine reads bits. This is not a problematic concept because we know what it means: the machine reads a bit if at any point in the execution of the algorithm the head scans the cell that contains the bit.
Now, to answer your question, let us make the conditions of the problem precise. Let us say that the two numbers in question $x$ and $y$ are written on two read-only tapes $t_x$ and $t_y$. Suppose we have a Turing machine $T$ which writes $0$ on the output tape if $x \neq y$ and it writes $1$ if $x = y$.
Theorem: If $T$ outputs $1$ then during its execution it scans every bit on $t_x$ and every bit on $t_y$.
Proof. We prove the statement by contradiction. Suppose there were a bit of $t_x$ which was not scanned (the argument is symmetric if there is an unscanned bit of $t_y$). Then the machine would operate in exactly the same way if we flipped that bit. Because we assumed that the machine works correctly, this would imply that the machine outputs $1$ on input $x$, $y$, and also on input $x'$, $y$ where $x'$ is $x$ with one bit flipped. It would follow that $x = y = x'$, a contradiction. QED.