Without focusing on the Gram-Schmidt procedure in particular, orthonormal bases (for a reasonable generalisation of "orthonormal") are possible in pseudo-Euclidean spaces, which are finite-dimensional real vector spaces equipped with a non-degenerate billinear form (and are important in special relativity). In finite-dimensions, this means there is no non-zero vector orthogonal to every vector, i.e.
$$\forall y : \langle x, y \rangle = 0 \implies x = 0.$$
In terms of $A$, this is equivalent to $A$ being invertible.
Non-degenerate forms do have some differences to inner products: we can have $\langle x, x \rangle$ be negative, or $0$ even when $x \neq 0$ (i.e. $x$ is self-orthogonal). The "norm" associated with the non-degenerate form is $\sqrt{|\langle x, x \rangle|}$, and isn't a norm at all, not least because it may send non-zero vectors $x$ to $0$.
Because of this, Gram-Schmidt is not really possible. However, building an orthonormal basis is possible, where orthonormal means, as usual, distinct vectors are orthogonal, and the "norm" of these vectors are all $1$ (meaning $\langle x, x \rangle = \pm 1$).
The procedure is simple. Let us call our pseudo-Euclidean space $V$.
- Choose any vector $x_1 \in V$ such that $\langle x_1, x_1 \rangle \neq 0$. This is always possible, because otherwise
$$\langle x, y \rangle = \frac{1}{4}(\langle x + y, x + y \rangle - \langle x - y, x - y \rangle) = 0$$
for all $x, y$, contradicting non-degeneracy. Note: $x_1 \neq 0$.
- Divide $x_1$ by $\|x_1\|$ to get your first orthonormal vector $e_1 \neq 0$.
- Restricting $\langle \cdot, \cdot \rangle$ to the subspace $\{e_1\}^\perp \subseteq V$ produces another non-degenerate bilinear form. We can first note that
$$V = \operatorname{span}\{e_1\} \oplus \{e_1\}^\perp$$
in the usual way: we can write, for any $x \in V$,
$$x = \frac{\langle x, e_1 \rangle}{\langle e_1, e_1\rangle} e_1 + \left(x - \frac{\langle x, e_1\rangle}{\langle e_1, e_1 \rangle} e_1\right),$$
and because $\langle e_1, e_1 \rangle \neq 0$, the sum is direct.
Hence, if we have $x \in \{e_1\}^\perp$ such that $\langle x, y \rangle = 0$ for all $y \in \{e^\perp\}$, then $\langle x, y \rangle = 0$ for all $y \in V$. As such, we can simply repeat steps $1$ and $2$ until we run out of dimensions, calling the resulting vectors $e_2, e_3, \ldots, e_n$. It's not difficult to see that the resulting list of vectors is orthonormal.
It's not really Gram-Schmidt because we can't really transform a basis to an orthonormal basis in the same way. Indeed, we might find that the first vector in the given basis has length $0$, or that subsequent vectors have orthogonal components that have length $0$. So, it's not quite an answer to your question, but it seemed relevant.