Aims. We investigate the possibility of detecting the gravitational influence of dark matter (DM) on the trajectory of prospective Doppler-ranging missions to Uranus and Neptune. In addition, we estimate the constraints such a mission can provide on modified and massive gravity theories via extra-precession measurements using orbiters around the ice giants. Methods. We employed Monte Carlo-Markov chain methods to reconstruct fictitious spacecraft trajectories in a simplified solar system model with varying amounts of DM. We characterise the noise on the Doppler link by the Allan deviation σA, scaled on the Cassini-era value of σACass = 3 × 10−15. Additionally, we compare the precision of prospective extra-precession measurements of Uranus and Neptune with the expected rates from simulations in the context of modifications to the inverse square law. Results. We estimate that the prospective mission will be sensitive to DM densities of the order of ρDM ∼ 9 × 10−20(σA/σACass) kg m−3, while the 1σ bound on the expected galactic density of ρDM ∼ 5 × 10−22 kg m−3 decreases as 1.0 × 10−20(σA/σACass)0.8 kg m−3. An improvement of two to three orders of magnitude from the baseline Allan deviation would guarantee a local detection of DM. Only a moderate reduction in ranging noise is required to rule out Milgrom’s interpolating function with solar system based observations, and improve constraints the graviton mass beyond current local-based or gravitational wave-based measurements. Our analysis also highlights the potential of future ranging missions to improve measurements of the standard gravitational parameters in the solar system. Conclusions. We believe that a ranging mission to Uranus and Neptune also presents a unique opportunity for non-planetary science. The noise improvements required to guarantee a local detection of dark matter in the early 2040s are realistic, provided they become one of the priorities during mission development.