First, let $K$ be an algebraically closed field. Now let $\phi: X \rightarrow Y$ be a dominant map of affine varieties, so namely $\phi^\star: K[Y]\rightarrow K[X]$ is an injection, and so we have a $K$-algebra inclusion $K[Y] \le K[X]$. I've been asked if there can exist a proper ideal $I$ of $K[Y]$ such that $K[X] = I\cdot K[X]$.
This appears to be equivalent to the question "can there exist $f \in K[Y]$ that is not a unit in $K[Y]$ but is a unit in a larger ring $K[X]$ which contains $K[Y]$?" I think the answer is yes, but I'm struggling to find a specific example.
What I've come up with so far is let $f$ be irreducible in $K[x,y]$ and let $Y = Z(f)$. Then in $K[x,y,z]$, consider $X = Z(f,zf-1)$. Then certainly in $K[X]$ we have that $f$ is a unit. But my problem here is that $(f)$ is not a proper ideal of $K[Y]$, it's the zero ideal. So that direction won't go anywhere...
Any ideas?
The zero ideal is a proper ideal; "proper" (usually) just means "not the whole ring". But your example has a bigger problem, which is that the ring $K[X]$ is actually the zero ring, and in particular the map $K[Y]\to K[X]$ is not injective. Indeed, in $K[X]$, $f=0$ and $zf=1$, so $1=z\cdot 0=0$. Geometrically, this corresponds to the fact that $X=\emptyset$ (you cannot have both $f=0$ and $zf-1=0$ at any point!), and so the map $X\to Y$ is not dominant.
You can avoid this problem by just not modding out $f$. That is, let $Y$ be all of $\mathbb{A}^2$ and $X=Z(zf-1)$; then you have to check that $K[Y]\to K[X]$ is injective (or geometrically, that $X\to Y$ is dominant). Actually, there's no reason to have both the variables $x$ and $y$; you can just let $f\in K[x]$ be a polynomial in one variable and consider $Y=\mathbb{A}^1$, $X=Z(yf-1)\subset \mathbb{A}^2$. You might find this particularly easy to work out in the case that $f=x$.