My TWH gelding was diagnosed with heaves when he was like 13-14. Our vet actually told us that riding him was good for his lungs as long as he wasn't having an actual episode. He was ridden for about 10 years after that. No competition or anything, but he enjoyed a good race on the trail.
That horse LOVED to run. Anyways, he just died last year at 27 years old, so it isn't the worse diagnoses. Especially if you follow your vet's management ideas.