If an indefinite quadratic form represents $1$ over $\mathbb Q$, does it represent $1$ over $\mathbb Z$? I asked myself a question about quaternion algebras that led to the following:

Let $f$ be an integral primitive indefinite binary quadratic form. Suppose $f$ represents $1$ over $\mathbb Q$. Does it follow that $f$ represents $1$ over $\mathbb Z$?

I know that a priori (or at least if $f$ has fundamental discriminant, which I don't assume) all one can say is that there is a form in the same genus as $f$ that represents $1$. But I wonder if there is something special about $1$ and about indefinite forms that makes this true.
I know that $f$ representing $1$ over $\mathbb Q$ is equivalent to saying that $f$ is $\mathsf{SL}_2(\mathbb Q)$-equivalent to $x^2 - \frac{D}{4} y^2$, where $D$ is the disciminant of $f$.
Clearly, the requirement that $f$ is primitive and indefinite is necessary.
 A: No in general.
Replacing $f$ by $-f$ you can replace $1$ by $-1$. But now the result is false even for the norm form, since having a field  unit of norm $-1$ is a local condition (Hasse Minkowski) but having it as an integer norm is not. This happens for the real quadratic field obtained by adjoining $\sqrt{221}$ for example, so
$$-x^2 + xy + 55y^2$$
Represents $1$ rationally ($[6/5,1/5]$) but not integrally.
A: ADDED: here is an indefinite ternary that rationally represents $1$ but not integrally:
$$ 4 x^2 + 4xy + 17 y^2 - 2 z^2 $$
This form does integrally represent $q^2,$ where $q$ is a (positive) prime and $q \equiv \pm 3 \pmod 8.$ The example is due to Siegel. 
Similar example due to Schulze-Pillot and Xu, (2004) 
$$ 4 x^2  + 25 y^2 - 5 z^2 $$
This form does integrally represent $q^2,$ where $q$ is a (positive) prime and $q \equiv \pm 2 \pmod 5.$
============================================
$$ 205 x^2 - y^2  $$
The most famous thing here would be $34 x^2 - y^2, $ which represents $-1$ but not 1.
If $p,q \equiv 1 \pmod 4$ are (positive) primes, from Mordell's book we find that
$$ x^2 - p y^2 $$
always represents $-1$ as well as $1$
If Legendre symbol $(p|q)= (q|p) = -1,$ then
$$ x^2 - p q y^2 $$
always represents $-1$ as well as $1$
However, Legendre symbol $(p|q)= (q|p) = 1,$  we are not sure about $x^2 - pq y^2.$ The two smallest $pq$ for which $-1$ fails are $205$ and $221,$ see the other answer
...........................
