Yes, by conservation of momentum and relative speed.
Calculate the speed of impact of a body falling into a red giant star; it's the same as the escape velocity of the star.
Then calculate the velocity imparted to the star by the impact of a planet say of 10 Jovian masses by conservation of momentum.
Bob Clark
