Unfortunately, no, you can’t ride any dragons in Hogwarts Legacy, at least in this base game. Perhaps you will be able to in DLC or a future sequel. You can only ride a few mounts in Hogwarts Legacy, like Hippogryphs and Thestrals.