I have not replaced my broken dome light cover on my 02. First, they are expensive and i am sure it will break again when i need to remove it.
Does anyone know of any aftermarket dome lights that can work on the Ranger?

Go to a wrecking yard and find the three bulb map reader version from an Explorer. Just remove the lens cover and the three philips head screws. The one I got has the two separate lights for individual map reading. This is a direct replacement, no modifications.
I have also installed the same dome light in my '86 Bronco II, That required an additional wire and the mount from the Explorer. (the mount for the B II, does require modification)
They cost me $5 per.
This is in my 02 Ranger.

This one is in my 86 B II, note the different base colors, Explorers have quite a variety and you can change the bases or remover them to custom color if you so desire.