Space missions can have as a goal the determination of the interior structure of a planet: this is the case for the ESA BepiColombo mission to Mercury. Very precise range and range-rate tracking from the Earth and onboard accelerometry will provide a huge amount of data, from which it will be possible to study the gravity field of Mercury and other parameters of interest. Gravity can be used to constrain the interior structure, but cannot uniquely determine the interior mass distribution. A much stronger constraint on the interior can be given by also determining the rotation state of the planet. If the planet is asymmetric enough, the gravity field as measured by an orbiting probe tracked from the Earth contains signatures from the rotation. Are these enough to solve for the rotation state, to the required accuracy, from tracking data alone, without measurements of the surface? In order to reach some result analytically, a simplified analytical model is developed, and the symmetry breaking, occurring when the shape of the planet deviates from spherical symmetry, is characterized by explicit formulae. Moreover, a full cycle numerical simulation of the Radio Science Experiment is performed, including the generation of simulated tracking and accelerometer data and the determination, by least-squares fit, of the Mercury-centric initial conditions of the probe, of Mercury's gravity field and its rotation state, together with other parameters affecting the dynamics. The conclusion is that there is no reason of principle prohibiting the determination of the rotation from gravimetry, and the sensitivity of the measurements and the coverage are good enough to perform the experiment at the required level of accuracy. This will be important also in ensuring independent terms of comparison for the rotation experiment performed with a high-resolution camera. The mission is currently under development and much care has to be taken in guaranteeing the scientific goals even if there is some change in scenario.