Solution 1:

I don't know of another reference, but the proof is not too hard once you have the right tools, there are just a lot of them.

Let $\dim M = n$. We can reduce the structure group of $TM$ to $O(n)$ by choosing a Riemannian metric. If $TM$ admits an indefinite metric with signature $(p, q)$, then the structure group of $TM$ reduces to $O(p, q)$, which is an indefinite orthogonal group. Now $O(p)\times O(q)$ is a maximal compact subgroup of $O(p, q)$ and hence a deformation retract of it, so the structure group of $TM$ reduces further to $O(p)\times O(q)$. Therefore, there are vector bundles $E$ and $F$ with $\operatorname{rank} E = p$ and $\operatorname{rank} F = q$ such that $TM \cong E\oplus F$. Conversely, if $TM \cong E\oplus F$ with $\operatorname{rank} E = p$ and $\operatorname{rank} F = q$, then $TM$ admits an indefinite metric with signature $(p, q)$, for example $g = g_E - g_F$ where $g_E$ and $g_F$ are Riemannian metrics on $E$ and $F$ respectively.

The case of Lorentzian metrics corresponds to $q = 1$; some people would instead say $p = 1$, but it doesn't matter, it is equivalent. The above shows that $TM$ admits a Lorentzian metric if and only if $TM \cong E\oplus L$ where $\operatorname{rank}(E) = n - 1$ and $L$ is a real line bundle.

If $M$ is not closed, it follows from obstruction theory that $TM$ admits a nowhere zero section and hence $TM \cong E\oplus\varepsilon^1$ where $\varepsilon^1$ denotes the trivial real line bundle. Therefore $M$ admits a Lorentzian metric.

Suppose now that $M$ is closed and $TM \cong E\oplus L$. If $M$ is orientable, then there is a double cover${}^*$ $p : M' \to M$ such that $p^*L \cong \varepsilon^1$ and hence $TM' \cong p^*TM \cong p^*E\oplus p^*L \cong p^*E\oplus\varepsilon^1$. As $M'$ is orientable, we see that $\chi(M') = 0$ by the Poincaré-Hopf Theorem, so $\chi(M) = 0$ as $\chi(M') = 2\chi(M)$. If $M$ is non-orientable, let $\pi : \widetilde{M} \to M$ be the orientable double cover. Then $T\widetilde{M} \cong \pi^*TM \cong \pi^*E\oplus\pi^*L$. Applying the argument as before with $L$ replaced by $\pi^*L$, we see that $\chi(\widetilde{M}) = 0$, so $\chi(M) = 0$ as $\chi(\widetilde{M}) = 2\chi(M)$.

Conversely, if $M$ is closed and $\chi(M) = 0$, then $M$ admits a nowhere-zero vector field (see Corollary $39.8$ of Steenrod's Topology of Fiber Bundles) and hence $TM \cong E\oplus\varepsilon^1$. In particular, a closed manifold admits a Lorentzian metric if and only if $\chi(M) = 0$.


${}^*$Explicitly, $M' = S(L)$, the sphere bundle of $L$ with respect to a Riemannian metric, and $p$ is just the restriction of the projection $L \to M$ to $S(L)$. The claim follows once you know that the pullback of a vector bundle by its own projection is trivial and the normal bundle of the sphere bundle in a vector bundle is trivial; see here for the latter claim.