If the cosets of $S\subseteq G$ partition $G$, must $S$ be a coset of a subgroup of $G$?
If $G$ is a group and $H\le G$ is a subgroup, then the left (or right) cosets of $H$ partition $G$. If $S\subseteq G$ is a left [right] coset of $H$, then the left [right] cosets of $S$ also partition $G$ (as they are precisely the left [right] cosets of $H$). Note that here I consider any set of the form $gS:=\{gs\mid s\in S\}$ for some $g\in G$ to be a coset of $S$, regardless of whether $S$ is a subgroup.
For the reverse direction, suppose $S\subseteq G$ is any subset whose cosets partition $G$. Simple counterexamples show that $S$ need not be a subgroup; but if we impose $e\in S$, then $S\le G$ follows, as shown here.
It seems natural to me, then that the following might hold:
Let $G$ be a group and $S\subseteq G$ be an arbitrary subset whose left [right] cosets partition $G$. Then $S$ is a left [right] coset of a subgroup of $G$, i.e., $S=gH$ for some $g\in G$ and $H\le G$.
Is this true? Please help me out with a proof or counterexample. (This is not a homework exercise, I'm just asking out of curiosity.)
Let's suppose without loss of generality that the left cosets of $S$ partition $G$. So, for some coset $gS$ of $S,$ we have $e \in gS$. Now, note that the cosets of $gS$ are precisely the cosets of $S$. To see this, note that if $h(gS)$ is a coset of $gS,$ then $h(gS) = (hg)S$ is also a coset of $S$; similarly, if $hS$ is a coset of $S,$ then $hS = (hg)(g^{-1}S)$ is also a coset of $gS$.
So, since the cosets of $S$ partition $G,$ the cosets of $gS$ also partition $G.$ By assumption $gS$ is a subset of $G$ containing the identity $e$, so by the answer you linked $gS$ is a subgroup of $G$.
Clearly, $S = g^{-1}(gS)$ is a coset of $gS,$ hence $S$ is a coset of a subgroup of $G$.