A very nice example, due to Motzkin, found I think after the publication of Taussky's American Math. Monthly paper referred to in the answer by Michael Lugo, is $$x^2y^4 + x^4y^2 +1 - 3 x^2y^2$$ which can be written as a sum of four rational squares $$ \frac{x^2y^2(x^2 + y^2 -2)^2(x^2 + y^2 +1) +(x^2 - y^2)^2} {(x^2 + y^2)^2},$$ yet is not a sum of squares of polynomials. (I learnt this example in a talk by K. Schmudgen.)