I think your confusion hinges on an assumption you're making in:
As the only other body in the universe is the Earth, the rocket will experience a gravitational pull, although it might be really small. Given infinite time, the rocket should accelerate towards the Earth.
The conclusion is incorrect. A body can feel a diminishingly small force, but never move in the direction of that force or even come to a complete stop as a result of it.
As the simplest example, take a one dimensional case of mass $m$ (that can serve as a toy model for your spaceship) moving in a gravitational-like potential (that diminishes as $1/x$). The equation of motion is:
$$ m\ddot{x} = -\frac{K}{x^2} $$
Which should be clear to you, it is just $F=ma$, where the restoring force $F(x)$ here is inversely proportional to the square of the distance of the spaceship, and $K$ is some positive real constant.
Now we can put $k=K/m$ and write:
$$ \ddot{x} +\frac{k}{x^2} = 0 $$
Now comes a bit of a standard trick for such a differential equation, multiply both sides by $\dot{x}$ so:
$$ \dot{x}\ddot{x}+\frac{k\dot{x}}{x^2}=0$$
the next part of the trick is to notice that both terms can be expressed as a time derivative of another quantity:
$$ \frac{d}{dt}\left(\frac{1}{2}\dot{x}^2 -\frac{k}{x}\right) = 0$$
Looks familiar? I hope so. It is the time derivative of the sum of the kinetic energy and the potential energy (per unit mass). We can integrate this easily, and knowingly denote the resulting constant on the RHS by the letter $E$:
$$\frac{1}{2}\dot{x}^2 -\frac{k}{x} = E $$
Now what can it tell us? $E$, being an integration constant, is a conserved quantity, the total energy of the spaceship. When the spaceship starts it journey, it has some nonzero KE and the direction of the velocity is outward from the gravitating body.
So, to check your assumption, we need to ask when does it happen that $\dot{x}=0$, which must occur first in order for the spaceship to turn around. So now let's look at the total initial energy $E_i$ which must equal the final energy $E_f$ when the velocity (and hence the KE) vanishes at $x_f$:
$$ E_i = \frac{1}{2}\dot{x}_i^2 - \frac{k}{x_i} = -\frac{k}{x_f} = E_f $$
where $x_i$ and $x_f$ are the initial and final positions respectively, and $\dot{x}_i$ is the initial velocity. We can see that this implies:
$$ \frac{1}{2}v_i^2 = \frac{k}{x_i}-\frac{k}{x_f} \tag{$\star$}$$
(where I've put $v_i = \dot{x}_i$, being a constant now, we don't need the explicit time derivative notation).
Now remember, we can set $v_i$ to whatever we like (strictly speaking up to the speed of light, $v_i < c$). On the right hand side, we have two positive quantities, the left term of which $k/x_i$ being clearly larger than $k/x_f$ which is good because KE must be positive!
So it is clear that if we set our initial velocity such that $\frac{1}{2}v_i^2 = \large\frac{k}{x_i}$ there will exist no finite $x_f$ that will satisfy the above condition marked $(\star)$.
This leads precisely to the condition defining the escape velocity, that is:
$$ \frac{1}{2}v^2_{\text{escape}} = \frac{k}{x_i}, $$
and solving for $v_{\text{escape}}$:
$$ v_{\text{escape}} = \sqrt{\frac{2k}{x_i}} $$
which is a standard result. In the case of Newtonian gravity, we have $k=GM$ with $G$ the gravitational constant, $M$ the mass of the gravitating body and $x_i$ the initial radius of the launch (for a launch from the surface of the Earth it would be Earth's radius).
So every initial speed $v_i$ we choose to launch with that satisfies $v_i > v_{\text{escape}}$, will lead to the spaceship never turning around, you may well say that it will be in a perpetual state of free fall.
I always think that this kind of thing is only unintuitive as much as understanding how it comes about that an infinite series of positive terms can sum up to a finite result. To mention a famous example:
$$ 1 + \frac{1}{2^2} + \frac{1}{3^2} + \frac{1}{4^2}+ \underbrace{ \dots}_{\text{infinitely many terms!}} = \frac{\pi^2}{6}$$
Our intuition tells us that if something keeps contributing in "the same way" endlessly, like continuing to pull forever in your case, however weakly, or like an endless series of positive terms in the above example, then it will always result in an effect which will itself be without bound, hence infinite.
But the study of calculus shows us this intuition is incorrect, as I hope I convinced you for the case of the spaceship, and I also hope you'll get an even better grasp on when you study more advanced topics in calculus like the convergence of infinite series and integrals.
Note that nowhere have I invoked the additional premise by which space itself is expanding, because I think this is unnecessary in order to address the core of your question.