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.
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.