I mean, you can. Get a power meter, and ride for as long as it takes to do a minimum of 1,000kJ worth of work. Then do not replace those calories. This will put someone in a 1,000kcal deficit, and weight loss will occur.
But again, it's the diet-- the not replacing the calories, that is extraordinarily difficult. I average 1,300kj worth of work, every single day of the year. Since this time in 2018, I've gained 15lbs.
__________________