Minor bodies of the solar system can be used to measure the spectrum of the Sun as a star by observing sunlight reflected by their surfaces. To perform an accurate measurement of the radial velocity of the Sun as a star by this method, it is necessary to take into account the Doppler shifts introduced by the motion of the reflecting body. Here we discuss the effect of its rotation. It gives a vanishing contribution only when the inclinations of the body rotation axis to the directions of the Sun and of the Earth observer are the same. When this is not the case, the perturbation of the radial velocity does not vanish and can reach up to about 2.4 m/s for an asteroid such as 2 Pallas that has an inclination of the spin axis to the plane of the ecliptic of about 30 degrees. We introduce a geometric model to compute the perturbation in the case of a uniformly reflecting body of spherical or triaxial ellipsoidal shape and provide general results to easily estimate the magnitude of the effect.