im not sure if this is what you're looking for, but from $f-Y$ vanishing on the two lines $Y=\pm 1$ (they vanish on $x\ne 0$, but because the vanishing locus is closed it follows that they also vanish on $(0,1)$ and $(0,-1)$), you can deduce that $f = Y + c(1-Y^2)$ in $k[X,Y]/(X(1-Y^2))$ for some $c\in k[x,y]/(X(1-Y^2))$ and I guess you can argue that this must vanish, by e.g. putting $x=0$ in
not sure if this is what you want