The source of this extraneous solution is the same as that of those encountered while completing the square: mistaking $ P \implies Q $ to mean the converse $ Q \implies P $, where $P$ is $ x^2 + x + 1 = 0 $ and $Q$ is $ x^2 + (-\frac{1}{x} - 1) + 1 = 0 $.
Try going backwards from $Q$ to $P$ yourself: you can't, at least not without the proposition $R$ $ x = -\frac{1}{x} - 1 $ (which is rightly derivable from $P$, but not from $Q$).
A more rigorous way to go about solving for $x$ would be to assume $ P \iff Q \ \& \ R $. So now you don't have to go back to $P$ to check if your solution is extraneous, but you do have the added restriction of $R$ which you have to keep in mind.
Since $R$ eliminates $ x = 0 $, and there are no other solutions for $Q$; you are forced to conclude that $P$ does not have any solutions either, and indeed your quadratic equation has no solutions in $\mathbb{R}$ (the two roots are complex: $-\sqrt[3]{-1} = -i^{\frac{2}{3}} $ and $ (-1)^\left(2/3\right) = i^{\frac{4}{3}}$).
That would mean $x = undef$ (or rather $\not\exists x \in \mathbb{R}$), I'm not sure what what the mathematical meaning or validity of $(x−1)(x^2+x+1)=0(x−1)$ would be other than just be saying $undef = undef$. (Could someone formalize what's happening here?)
Also, if we're trying to go backward from $x^2 + \frac{1}{x} = 0$ (which does have the solution 1), we can indeed multiply both sides by the identity $\frac{(x - y)(x^2 + xy + y^2}{(x^3 - y^3)}$ as it is equal to $1$; but we must ensure that the denominator we're dividing by is not 0 (as if we break the rules, we're kicked out of the nice world of our number theory), which in the case of $x = 1$ is indeed that exactly.