Let $d$ and $n$ be square-free natural numbers. Is it true that $x^2+dy^2=n$ has a rational solution if and only if it has an integral solution? I know this is true for circles (i.e., when $d=1$) but I can't seem to be able to extend that proof to ellipses in general.
Can someone give me a proof (hopefully elementary), or a counterexample?