Let $S$ be a semigroup (i.e. $S$ is endowed with an associative operation). With some work, one can prove that the idempotents of $S$ are in one-to-one correspondence with maximal subgroups of $S$: the correspondence associates to each idempotent $e$ the maximal subgroup $eSe$.
My question is: do we still get the same correspondence if $S$ were to be monoid? I think the answer should be yes since we would only need to add an identity element to $S$ to make it into a semigroup.
Your are confusing several things. First, if $e$ is an idempotent of $S$, $eSe$ is not a group, but a monoid with identity $e$. The correspondence you mention should map $e$ to the group of units of the monoid $eSe$, which is also the maximal subgroup of $S$ with identity $e$, or, equivalently, the $\cal H$-class of $e$.
The fact that $S$ is a monoid is irrelevant, since a monoid is a semigroup. If $1$ is the identity of $S$, then $1S1 = S$ and you just map $1$ to the group of units of $S$.
Finally, you mixed up things again in the last paragraph. It works the other way around. If $S$ is a semigroup which is not a monoid, you can add an identity to $S$ to get a monoid.