A stellar flare-coronal mass ejection event revealed by X-ray plasma motions