All the credit for finding a simple integrating factor goes to Aleksas Domarkas.
I only contribute this answer for two reasons:
It seems like Aleksas used an intermediate step that is left to solve by more pedestrian readers (like me).
The ODE really interesting
and related again to the mother of all differential forms in $\mathbb R^2\setminus\{0\}$ that are closed but not exact (see below).
Notation:
$$
Q\,dy+P\,dx=0\,,\quad Q(x,y)=x+x^2+y^2\,,\quad P(x,y)=-y\,.
$$
Ansatz for the integrating factor:
$$
\mu(x,y)=g(x^2+y^2)\,.
$$
This gives
$$
\mu_x=2\,x\,g'\,,\quad \mu_y=2\,y\,g'\,.
$$
The condition
$$
\partial_y(\mu P)=\partial_x(\mu Q)
$$
gives
$$
\mu_yP+\mu\,P_y=\mu_xQ+\mu\,Q_x\,,
$$
that is:
$$
-2\,y^2g'-g=2\,x\,g'\,(x+x^2+y^2)+g\,(1+2x)\,.
$$
This simplifies to
$$
0=2\,(y^2+x^2)\,g'+2\,x\,g'(x^2+y^2)+2\,g+2\,x\,g\,.
$$
Setting $t=x^2+y^2$ this simplifies further to
$$
0=t\,g'+g+x\,(t\,g'+g)
$$
from which we conclude $0=t\,g'+g$ and thus $g(t)=1/t\,.$
One integrating factor is therefore
$$
\boxed{\quad\phantom{\Big|}\mu(x,y)=\frac1{x^2+y^2}\,\quad}
$$
(cf. Aleksas).
Now solving the ODE:
The traditional method of finding
a function $f(x,y)$ whose gradient is $(\mu\,Q,\mu\,P)$ won't work in this
case as I will show in the following.
The ODE $\mu\,Q\,dy+\mu\,P\,dx=0$ now takes the form
$$
\underbrace{\frac{x\,dy-y\,dx}{x^2+y^2}}_{\textstyle\boldsymbol{\omega}}+dy=0\,.
$$
The first term $\boldsymbol{\omega}$ is the mother of all differential forms on $\mathbb R^2\setminus\{0\}$ which is closed but not exact: The function
$$
\phi(x,y)=\arccos\Big(\frac{x}{\sqrt{x^2+y^2}}\Big)
$$
(or in polar coordinates $\phi(r,\theta)=-\theta$) solves $d\phi=\boldsymbol{\omega}$ but has a branch cut where it is discontinuous. In other words, it is defined only on, say, the domain $\mathbb R^2\setminus(-\infty,0)\,.$
Obviously
$$
f(x,y)=\phi(x,y)+y
$$
is a function on that same domain that satisfies $df=\boldsymbol{\omega}+dy\,.$
It follows that the solutions of the original ODEs $Q\,dy+P\,dx=0$ and $\mu\,Q\,dy+\mu\,P\,dx=0$ are implicitly given as
the level curves of $f(x,y)=0\,.$