The Proteas could manage to add only a single run to their overnight total before Nadeem secured the last two wickets in successive balls.
South Africa were 132-8 at the close of play with India requiring two wickets to wrap up a series sweep over Faf du Plessis' men.
"Those catches, they stick or they don't. So unfortunately it wasn't our way, it was Rohit's. He played well, so well done to him."
South Africa were in trouble at nine for two, with Indian fast bowlers sending the opposition openers back to the pavilion in Ranchi.
"If he starts coming good top of the order, it changes everything for the Indian team, even when you're touring."
Sharma, on 117, combined with Ajinkya Rahane, on 83, to put on an unbeaten 185-run stand after the hosts were wobbling at 39-3.
South Africa seek to turn the tables on India and get a consolatory win to bag crucial Test championship points after losing the Test series
Aiden Markram will not be available for the third and final Test against India after he sustained a wrist injury during the previous game in Pune.
Six players test negative in coronavirus retests; Pakistan announce 20-member squad
Second group of Pakistan cricketers to leave for England on Friday
'Plans underway to stage remaining PSL matches this year' - PCB
Ross Taylor open to a possible PSL stint in the future
PCB conducts COVID-19 tests of five reserve players
Six players eligible to join Pakistan squad after second negative test in three days
Pakistan squad in England test negative for coronavirus
Hafeez tests negative for coronavirus a day after being declared positive by PCB
Shannon Gabriel officially added to West Indies Test squad
Younis Khan singles out Jofra Archer as the major threat for Pakistan