Can ultrasonic distance sensor be used to measure groundspeed?
I'm not aware of cheap ultrasound sensors that can measure the Doppler in the return signal. At the risk of answering something that isn't quite what you asked do you need ground speed or is air speed sufficient?

If you place two ultrasound sensors facing each other in line with the direction of travel and measure the range between them then you will get a measurement error proportional to the airspeed in the direction between the sensors. e.g. If measure over 1m then you would expect the ultrasound to take 1/330 = 3.03ms to arrive. (taking the speed of sound as being 330m/s for convenience). If you are traveling at 10m/s then you will get a reading of 2.94ms pining from the front to the back since the sound is traveling at 340m/s relative to your device.

This is how ultrasonic wind speed measurement systems work, the only difference is that you are measuring the airflow caused by your movement rather than the wind.

Pinging in both directions (back to front and front to back) and taking the difference between the two allows you to compensate for temperature effects and separation measurement errors.

Of course this all falls apart if your environment has significant wind in comparison to your velocity or if you place the sensors somewhere where the air flow around them isn't representative of your speed.