Suppose that $f:X\times Y \to Z$ and that $f$ has a non-trivial dependence on $x$. So, $f$ cannot be constant with respect to $x$. Now suppose that for an $x, x' \in X$ that $f(x, y) = f(x', y)$ for all $y\in Y$.
Does this imply that $x = x'$?
This seems like it should be relatively straightforward, but I'm having a hard time thinking through the logic of it. Does restricting the domain/codomain to $\mathbb{R}$ change anything? Or, if it is not true in general, what conditions on $f$ would make it true?
You would need $f_{y_0}=f(x,y_0)$ to be 1-1 for all $y_0\in Y$ to make that claim. If $f$ isn't injective on every fixed y, then you get the problems listed in the comment by @3rdmoment , copying that function here:
$$f(x,y)=x^2+y$$ as you can see, fixing $y$ makes this function not injective in x.