Of course he did not have to wear it... but that doesn't mean Rowling had him wear it "just to get rid of him".
Dumbledore also knew the stone set in the ring was the Resurrection Stone. This was his one great curiosity/weakness/fear (depends on how you look at it). Dumbledore was tempted by having at least a chance, no matter how small, of bringing his family back.
He explains this much to both Snape and Harry.
"Why did you put on that ring? It carries a curse, surely you realized that. Why even touch it?" ...
"I... was a fool. Sorely tempted"
- Harry Potter and the Deathly Hallows, Chapter 33, The Prince's Tale.
“When I discovered it, after all those years, buried in the abandoned home of the Gaunts - the Hallow I had craved most of all, though in my youth I had wanted it for very different reasons - I lost my head, Harry. I quite forgot that it was now a Horcrux, that the ring was sure to carry a curse.
- Harry Potter and the Deathly Hallows, Chapter 35, King's Cross.