There doesn't seem to be any large possibility of the earth wandering space unattached to (the remnants) of the Sun.
Scientific American covered Earth's long-term fate in 2008
Although scientists agree on the sun’s future, they disagree about what will happen to Earth. Since 1924, when British mathematician James Jeans first considered Earth’s fate during the sun’s red giant phase, a bevy of scientists have reached oscillating conclusions. In some scenarios, our planet escapes vaporization; in the latest analyses, however, it does not.
The answer is not straightforward, because although the sun will expand beyond Earth’s orbit, or one astronomical unit (AU), it will lose mass along the way. As a result, Earth should drift outward as the gravitational tug lessens over time. (At its maximum radius of 1.2 AU, the sun will have lost about one third of its mass, compared with its current heft.) In this way, Earth could escape solar envelopment.
That's escape envelopment, not escape orbit.
According to space.com
Collisions between planets might conceivably lead to the ejection of Earth from orbit
And as the sun ages, it is expected to swell and lose mass; previous studies have shown that could have significant effects on the planets in the next 7 billion years or so. Earth might be vaporized when this happens, or it might ? with a gravitational assist from a passing star ? be booted right out of the solar system. A study in 2001 by Laughlin, then at NASA, and Fred Adams of the University of Michigan put the odds of the Earth being ejected at one-in-100,000.