I know that a subring of a PID isn't necessarily a PID, but what about ideals?
Suppose $R$ is a PID, and $I$ is its ideal. Now take $J$ to be an ideal of $I$ (note that $J$ isn't necessarily an ideal of $R$), is $J$ necessarily generated by one element?
Sorry about the edit.
Typically $J$ will not be generated by one element as an ideal of $I$. For instance, let $R=\mathbb{Q}[x]$, $I=(x)$, and $J=I$. Then no element of $J$ generates it as an ideal of $I$. Indeed, if $f(x)\in J$ has the form $$f(x)=ax^n+\text{terms with higher powers of $x$},$$ then every element of the ideal in $I$ generated by $f(x)$ will have a coefficient of $x^n$ that is an integer multiple of $a$. Since not every rational number is an integer multiple of $a$, the ideal generated by $f(x)$ cannot be all of $J$.