If a ship is just moving from A to B, rather than harvesting you cannot stop it.