One problem: Madara knows the masked man. Not zetsu, but Tobi. How is Tobi=Obito possible if Madara died shortly after awakening the rinnegan? The time of Madara's death was sometime after the birth of Nagato, this is because Madara also knows Nagato by name. So no, a zetsu did'nt give Nagato the rinnegan, real Madara did, he said he was expecting to be revived by rinne tensei by Nagato so basically these 3 points invalidate you:
1. The manga has shown that Madara knows the masked man Tobi
2. Madara said he died shortly after awakening the rinnegan
3. Madara knows Nagato by name as well, and this was the same Pain/Nagato of Akatsuki because Madara thought he had been revived via his Rinne Tensei, which only the rinnegan can use. So Madara must have died after meeting Nagato. But Nagato was shown as a 6 year old kid with the rinnegan, and he never remembered Madara in his flashback. So by that time(when Nagato was a kid) Madara had already given him the rinnegan(kid Nagato was shown with the rinnegan), and therefore he died before then(Madara's death=shortly after awakening the rinnegan). But while he was still alive he met Tobi(because he knows him as well), this had to have been before that time(when Nagato was shown as a kid with the rinnegan) as well and before that time Obito was'nt born as Oro was on Jiraiya's team, and the sannin had only just got their title it was years before .
So Tobi cannot be Obito by logic.