Finite group with a special property Let $(G,\cdot)$ be a finite group  with the identity element $e$ such that for each proper subgroup $H$ of $G$ there exists a unique element $g_H\in H$, $g_H\ne e$, such that the following properties hold:
(a) $g_H^2=e$;
(b) for any two distinct proper subgroups $H,K$ of $G$ we have $g_H\ne g_K$.
Then the group $G$ is abelian.

Thus far, I have considered a prime number $p$ dividing the order of $G$. Then, by Cauchy's theorem, there exists an element of $G$ of order $p$ and consider the subgroup $H:=\langle x\rangle=\{e,x,\dots,x^{p-1}\}$. By hypothesis, there exists $g_H=x^r$ (with $r\in \{1,\dots,p-1\}$) and $g_H^2=x^{2r}=e$. Then, we have $p\mid 2r$ and it follows $p=2$. Therefore, the order of $G$ is a power of 2.

There is a simpler way than the accepted answer.
Again as you say in the question, the group has order a power of $2.$ I claim that every element has order $2.$ Indeed, if not, there is an element $g$ of order $4.$  The subgroups generated by $g$ and $g^2$ have the same element of order $2$ ($g^2$) contradicting the hypothesis. So every element has order $2.$ But such a group is abelian ($ab(ba)^{-1} = a b a^{-1} b^{-1} = a b a b = (ab)^2 = e.$)
