In fact Perseverance's Mars Environmental Dynamics Analyzer (MEDA) instrument does measure both air and ground temperatures:
MEDA weighs roughly 12 pounds (5.5 kilograms) and contains a suite of environmental sensors to record dust levels and six atmospheric conditions – wind (both speed and direction), pressure, relative humidity, air temperature, ground temperature, and radiation (from both the Sun and space). The system wakes itself up every hour, and after recording and storing data, it goes to sleep independently of rover operations. The system records data whether the rover is awake or not, both day and night.
Boasting higher overall durability and additional temperature readings, MEDA can record the temperature at three atmospheric heights: 2.76 feet (0.84 meters), 4.76 feet (1.45 meters), and 98.43 feet (30 meters), in addition to the surface temperature.
The range of temperatures reported un the source article us from $-83°C$ to $-22°C$, but these are not specified as air or ground temperatures. Note that the subzero ground temperatures do not imply that all condensed water is frozen on Mars, since some dissolved salts such as magnesium perchlorate may allow water to remain liquid through most of this temperature range.