In this post
It was proved that a commutative ring $A$ is a field iff $A[x]$ is a principal ideal domain. By this theorem, because $GF_9$ is a finite field, then $GF_9[x]$ must be a principal ideal domian. However in my midterm exam of cryptography. There is a problem said $GF_9[x]$ is a principal ideal domain but not a field. Using the polynomial representation of $GF_9$, we can view $GF_9[x]$ as two variables polynomial in $\alpha$ and $x$ with coefficient belong to $GF_3$.
My question is, how to prove that it is not a field?
Are there any necessary and sufficient condition to make it become a field?
Furthermore, from Wikipedia it is said that
"$K[x,y]$ : rings of polynomials in two variables. The ideal $(x,y)$ is not principal." It confused me that whether $GF_9[x]$ is a principal ideal domain or not.