A domain in which every finitely generated ideal is principal is called a Bézout domain. It is equivalent to the statement that every $2$-generated ideal is principal.
A standard example of a Bézout domain is the ring of algebraic integers. It is easy to verify that there are ideals that are not principal: for example, the ideal generated by all $2^{1/n}$ is not principal (any generator would lie in a finite extension of $\mathbb{Q}$, but no finite extension of $Q$ contains all $n$th roots of $2$). Proving that every $2$-generated ideal is principal was described by Dedekind as an "important but difficult" theorem, so this will not satisfy your "elementary techniques" requirement. Another standard example is the ring of entire functions, which likewise would take you too far afield.
Wikipedia's page on Bézout domains has a sketch of how to construct a non-UFD Bézout domain from any PID that is not a field. Applying it to $\mathbb{Z}$, it gives the ring $R=\mathbb{Z}+x\mathbb{Q}[x]$ (polynomials with rational coefficients whose constant term is an integer). This one should work for your requirements.
Proving that any two-generated ideal of $R$ is principal is equivalent to showing that for any elements $p(x)$ and $q(x)$, there is a common divisor that can be written in the form $r(x)p(x) + s(x)q(x)$ with $r(x),s(x)\in R$. Clearly any such divisor lies in $(p(x),q(x))$, and both $p(x)$ and $q(x)$ will lie in $(r(x)p(x)+s(x)q(x))$ because the generator divides them.
So let $p(x)$ and $q(x)$ be two elements of $R$; if they have a common divisor $d\in R$ and we can find a common divisor of $(p/d)$ and $(q/d)$ that is a linear combination of them, then multiplying through by $d$ will yield one for $p(x)$ and $q(x)$.
If $p(0)=q(0)=0$, then let $n$ be the largest positive integer such that $x^n$ divides both $p(x)$ and $q(x)$; then dividing both by a suitable $ax^n$ with $a\in\mathbb{Q}$ so that the result has integer constant term, we may assume that either $p_0=p(0)$ or $q_0=q(0)$ are nonzero.
If $s(x)$ is the gcd of $p(x)$ and $q(x)$ in $\mathbb{Q}[x]$, we can find a rational multiple of $s(x)$ so that $s(x)$ has constant term equal to $1$, and hence lies in $R$. We can then factor out this greatest common divisor, so we may assume that $p(x)$ and $q(x)$ are relatively prime in $\mathbb{Q}[x]$. Then $(p(x),q(x))=(1)$, so there are polynomials $a(x)$ and $b(x)$ in $\mathbb{Q}[x]$ such that $a(x)p(x)+b(x)q(x)=1$. Multiplying by a suitable integer, we get that the ideal $(p(x),q(x))$ in $R$ contains a constant $r\in\mathbb{Z}$.
Let $d=\gcd(p_0,q_0)$; since at least one of $p_0$ and $q_0$ is nonzero, $d\gt 0$. Note that $d$ divides $p(x)$ and $q(x)$, since a constant divides an element of $\mathbb{Z}+x\mathbb{Q}[x]$ if and only if it divides the constant term of that element. To complete the proof, it is enough to show that $d\in (p(x),q(x))$.
Write $d=ap_0 + bq_0$, with $a,b\in \mathbb{Z}$. Then $ap(x)+bq(x)\in (p(x),q(x))$ has constant term $d$. Therefore, $ap(x)+bq(x)-d$ has zero constant term, and therefore is a multiple of $r$. Since $r\in (p(x),q(x))$, it follows that $ap(x)+bq(x)-d\in (p(x),q(x))$. Therefore, $d\in (p(x),q(x))$, which completes the proof.
Finally, to exhibit a non-finitely generated ideal, consider the ideal generated by all elements of the form $\frac{1}{n}x$. It cannot be finitely generated, for if it were finitely generated then by the above it would be principal, generated by some element of the form $\frac{a}{b}x+\cdots$, and the ideal this generated does not contain $\frac{1}{b+1}x$. (Alternatively, $x$ is divisible by all primes, which are irreducible, so it cannot have a unique factorization; hence $R$ is not a UFD and therefore cannot be a PID, but you probably want the explicit example.)