A little context for the following question, first. As Noah Stein notes in a comment below, the present question is closely related to the free semialgebraic geometry studied by Helton and his colleagues. In fact, working on the free nonabelian monoid rather than the free abelian group as I do below, something very close to an affirmative answer to the present question holds (see Proposition 2.1 here), but the proof of this strongly uses the fact that in a free monoid there can be no "multiplicative cancellation of terms". Roughly, the present question asks what happens if we allow multiplicative inverses of elements. A related question of mine is here.
Suppose $A\in M_n(\mathbb{R})$ is a symmetric matrix, and let $G$ be the free abelian group on $n$ generators $a_{1},...,a_{n}$. Let $\mathbb{R}G$ be the real group algebra of $G$ with involution $(\sum \lambda_{g}g)^{*}=\sum \lambda_{g}g^{-1}$. Suppose that the quadratic *-polynomial $\sum_{i,j=1}^{n}A_{ij}a_{i}^{*}a_{j}=\sum_{k=1}^{N}h_{k}^{*}h_{k}$ for some $h_{1},...,h_{N}\in \mathbb{R}G$, i.e. is a sum of hermitian squares in the group algebra. Does this imply $A=B^{T}B+D$ for some $B\in M_n(\mathbb{R})$ and $D\in M_n(\mathbb{R})$ a diagonal matrix with zero trace?