It depends on the individual horse. As long as the horse is healthy and care is given to properly care for and condition the horse, there is no reason that the horse cannot continue to be ridden. It also depends on what your asking the horse to do. I know of a man that continues to ride his 35 year old to this day. He used to ride it for endurance, but now just rides him for simple trail rides.
Exercise benefits the older horse, just like it benefits older people.
If you have any questions whether your horses activities should be limited, get your vets opinion. I leased an Arab mare for six years until she was 24 yrs old and she was sound as could be. But I've seen horses that were used up at 10 yrs old. Personally, I like older horses. My Morgan gelding is 14 now.