Given an edge word $X$, let $\sigma(X)$ denote the corresponding surface (or equivalence class of surfaces defined up to homeomorphism).
I've been reading some notes on the classification of surfaces via edge words (found in this pdf). The authors mention that the connected sum of surfaces corresponds to the concatenation of the corresponding edge words, i.e. $\sigma(W_1 W_2)=\sigma(W_1)\,\sharp\, \sigma(W_2)$, where $W_i$ are arbitrary edge words, and $\sharp$ denotes the connected sum.
Later on, the authors also mention that $\sigma(X)\simeq \sigma(X^{-1})$ for any edge word $X$, which also seems very natural: reading the boundary in the opposite direction shouldn't change the corresponding surface.
However, I'm failing to see how these two conditions are consistent with each other. Don't they also imply that, for any edge word such as $ab$, we would have $\sigma(ab)\simeq \sigma(ab^{-1})$? We'd have $$\sigma(ab)=\sigma(a)\,\sharp\,\sigma(b) \simeq \sigma(a)\,\sharp\,\sigma(b^{-1}) \simeq \sigma(ab^{-1}).$$ A possible fallacy I see in the above argument is that if two surfaces are homeomorphic, $S_1\simeq S_2$, that does not mean that we also have $S\,\sharp\, S_1\simeq S\,\sharp \,S_2$. But if this was the case, then I don't understand how the classification result works: the trick is to manipulate edge words in order to progressively "extract" copies of torii and projective planes. But if we cannot apply equivalences of edge words within a connect sum, wouldn't we have to stop the argument after the first torus/projective plane has been extracted?