Suppose that $X$ is a curve in $\mathbb{A}^3$ (in the AG sense, let's say over an algebraically closed field $k$) that contains no lines perpendicular to the $xy$ plane, and that there exist two polynomials $f,g\in k[x,y,z]$ such that $\{f=0\}\cap\{g=0\}=X\cup l_1\cup\cdots\cup l_n$, where $l_i$ are lines perpendicular to the $xy$ plane (and can possibly intersect $X$). Is it possible to find a third polynomial $h$ such that the intersection $\{f=0\}\cap\{g=0\}\cap\{h=0\}=X$?
Since $X$ is algebraic, of course given a point that does not lie on $X$, there is a polynomial that is zero on $X$ and not zero on that point. I want to see if I can "cut out" $X$ with one other equation.