In a perfect vacuum and clear of any other interfering force, there is indeed nothing to stop motion of an object, so it will continue to move in the direction and at a velocity at which it is started out at.
However, if you applied a force to slow it down or change its direction, it will either slow down or change to another direction. So its motion is totally dependent on the velocity and direction it is initially given.
If you change the velocity, it will continue to go in the same direction, but at the new velocity.
It cannot return to its previous velocity.
"Perpetual motion" does not exist, and in any case does nothing to describe the motion you are talking about.
If it were to be "perpetual motion", you would be able to harness and use the motion to do some other work on a continuing basis, without changing either velocity or direction.