How could Madara absorb the Divine tree?
First, it's not the Rinnegan that absorbed the divine tree/ten-tails; it's the jutsu Madara weaved that summoned it. Obito did the same thing too to become the ten-tails jinchuriki.

Take a look at these pictures from the anime and manga for yourself:

Episode 414 (On the Brink of Death)


Chatper 663 (Absolutely)


Second, Obito's Mangekyo Sharingan allows him to absorb objects into another dimension. Madara is absorbing the ten-tails into himself. There's a difference. Therefore, it's not a plot hole.