For any group $G$, there are two maps $G \ast G \to G$ given by projection onto the individual factors. For an element $g \in G$, I'll write $g'$ for its image in the first factor and $g''$ for its image in the second factor.
Claim: The equalizer of the diagram $G \ast G \rightrightarrows G$ is always free on the elements $g' g''$ as $g$ ranges over the non-identity elements.
Once you know this, it automatically follows that cogroup objects are free: they are groups $G$ equipped with a map $G \to G \ast G$ which equalizes these two arrows, and which is injective, and this exhibits them as a subgroup of a free group.
To prove the claim, take the free group $F$ on symbols $s_g$ for non-identity elements of $G$, and take the group homomorphism $F \to G \ast G$, $s_g \mapsto g' g''$.
The kernel is trivial: if you take a reduced word in the $s_g$ and look at its image, you get a word in $G \ast G$. You can take this word and write down the associated reduced word in $G \ast G$ by collecting adjacent terms, and there cannot be any cancellation unless the original word was unreduced.
The image is the equalizer: if you have a word in $G \ast G$ of the form $a' b'' c' d'' \cdots$, you can rewrite it as
$$
a' a'' (a^{-1} b)'' (a^{-1} b)' (b^{-1} a c)' (b^{-1} a c)'' (c^{-1} a^{-1} b d)'' \cdots
$$
which is a product of elements in the image of $F$; the term left at the end will be
$$
(\cdots e^{-1} c^{-1} a^{-1} b d f \cdots)''
$$
which is trivial precisely when $ace\cdots = bdf\cdots$, or equivalently the two projections are equal.