The ideal generated by an irreducible element contains a prime ideal implies that the element is prime in a non-UFD? Let $R$ be an integral domain. Assume $R$ is a factorization domain, but the decomposition into irreducible is not necessarily unique.  Prove that if the ideal $(a)$ generated by an irreducible element $a$ contains a prime ideal, then $a$ is prime. 
I've been trying to solve this for a while but nothing seems to work. How would you approach/prove this?
 A: Firstly, the statement should require that $(a)$ contains a nonzero prime ideal, since all ideals contain $(0)$, which is prime, since you've specified that our ring, call it $R$ is a domain.
First note that $a$ is prime if and only if the ideal $(a)$ is prime. Thus if we have $\newcommand\pp{\mathfrak{p}}\pp\subseteq (a)$, then it suffices to prove that $a\in \pp$, since then $(a)=\pp$, so $(a)$ is prime.
Thus if $af\in \pp$ with $f\not\in\pp$, then $a\in\pp$, and $a$ is prime. Thus if $a$ is not prime, then if $ar\in \pp$, then $r\in\pp$. However, since every element of $\pp$ is of the form $ar$ for some $r\in R$, this tells us that $a\pp=\pp$.
Now since $a\ne 0$ and $a$ is a nonunit, and $\pp\ne R$ is a proper ideal, $a\pp$ contains no irreducibles (if $a\pi \in a\pp$, then since $a,\pi$ are both nonunits, $a\pi$ is not irreducible). Hence since $a\pp=\pp$, $\pp$ contains no irreducibles. However any nonzero prime ideal in a factorization domain contains an irreducible (let $x=\prod_i \pi_i\ne 0\in \pp$, then if none of the irreducible $\pi_i$s was in $\pp$, then since $\pp$ is prime, their product, $x$ wouldn't be in $\pp$ either, contradiction). Thus we have a contradiction, so we've proved our desired claim.

Note actually that we've proven the stronger claim:
  Let $R$ be a factorization domain, then if $0\subsetneq \pp \subseteq (a)\subsetneq R$, with $\pp$ prime, then $\pp=(a)$, so $a$ is prime. 

That is, we don't need that $a$ is irreducible, just that it is nonzero and not a unit.
Edit: We can do better. An argument at the beginning of chapter 10 in Eisenbud's Commutative Algebra reminded me that we don't need that $R$ is a factorization domain, just that it is a domain. Instead,
once we have $a\pp=\pp$, we apply Nakayama's lemma to conclude that $(1-ax)\pp=0$, for some $ax\in (a)$. However, since $\pp\ne 0$ and $R$ is a domain, we have $1-ax=0$, but we also have that $(a)$ is proper, so $1\not \in (a)$, so $1-ax\ne 0$. This is a contradiction. Thus, in fact, we have 

Let $R$ be a domain. If $0\subsetneq \pp \subseteq (a) \subsetneq R$, with $\pp$ prime, then $\pp=(a)$, so $a$ is prime.

