Ok madara took it to kamui himself to the other dimension. He then took the rinnegan from obito, so what, he just threw it away somewhere ? is it still lying somewhere in that dimension..
He gave Kakashi's Sharingan back to Obito. They did an eye transfer. BZ was controlling Obito a that time. That's how you see Kakashi get back his normal eye and Obito with a DMS.
The eye was so far deteriorated, he would've been fighting half blind for only a handful of kamui attempts that couldn't be used effectively at long range