Let $D$ be a UFD, let $F$ be the field of fractions of $D$, let $a \in D$ be such that $x^2 \ne a, \forall x \in D$. Then is it true that $x^2\ne a ,\forall x \in F$ ?
(This problem is motivated from the fact that if square root of an integer is not an integer, then the square root is not rational. I know that in the problem, if we drop the UFD condition on $D$ then it is not valid, for example $D=\{f(x) \in \mathbb Z[x] : x^2 | f(x)-f(0) \}$ and $a=x^2$.)