Rosetta couldn't, it's a tiny spacecraft doing only occasional navigational thrusts, effect would be so small it surely disappears in the rounding errors as it were :).
And anyway, any effect would be very tiny.
But even a small spacecraft could have some effect, if it was equipped with an ion thruster able to continually exert a small pull.
The effect would be tiny, even if you keep it running like this for years (as is the plan).
But could be useful e.g. for an inactive comet or asteroid headed for Earth.
Normally anything heading our way will do many flybys of Earth before it hits it, as Earth is such a tiny target.
So - suppose an inactive multi kilometer scale asteroid was heading for Earth, but missed it, and is going to hit Earth next time around a few decades later.
Well the path after it flies past Earth is very sensitive to tiny changes of position and velocity as it passes Earth.
So, a tiny force like this applied continuously at some point a year or two before its first close flyby of Earth could make a huge difference to its trajectory for the next flyby.
The point in using an ion thruster here is that you can load it with a small amount of fuel which is used up continuously but exhaust has a very high speed so not much fuel is needed for the same amount of thrust. But if the total amount of thrust is low, you could also use a chemical motor.
Typically more would be needed, but in that example the total extra delta v is only a millionth of a meter per second for Apophis, applied a few years before the flyby.