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.
Wahab Riaz, Faheem Ashraf included in 20-man shortlist for England Tests
The flair, the calmness and the promises: Pakistan's rhetoric in the lead up to first Test
Sohail Khan bags five wickets as Pakistan's leading batsmen flounder
'Plans underway to stage remaining PSL matches this year' - PCB
Pakistan grapple with selection predicament as fired up England eye strong start
Team Green put on improved batting display after Naseem Shah shines again
Broad takes 500 Test wickets, Woakes bags five as England reclaim Wisden Trophy
'Disappointed over England tour snub given my experience of county cricket' – Junaid Khan
Haris Rauf set to join Pakistan squad in England after returning two negative tests
Mohammad Amir departs for England tour after testing negative twice for Covid-19