If $f$ is open (e.g. $f$ finite type and flat over noetherian $Y$), then your condition is trivially satisfied: let $V'$ be any affine open neighborhood of $y$ and let $U'$ be an affine open subset of $X$ such that $y\in f(U')\subseteq V'$. Take a principal open subset $V'_h$ such that $y\in V'_h\subseteq f(U')$, then $V:=V'_h$ and $U:=U'_h$ are what you want. A counterexample with $X$ irreducible: consider $Y$ the affine plan, $y$ the origin and $f : X\to Y$ the blowing-up of $y$. For any affine open subset $V$ containing $y$, $f^{-1}(V) \to V$ is the blowing-up of $y$. If $f(U)=V$, then the complement of $U$ in $f^{-1}(V)$ is finite because $f$ is an isomorphism out of $y$. By Zariski's extension theorem, $O_X(U)=O_X(f^{-1})(V)=O_Y(V)$. This is impossible if $U$ is affine.