De Villiers scored 99 as South Africa, replying to Sri Lanka's first innings of 180, amassed 389 for nine for a lead of 209 runs.
De Villiers, 27, drove the seamer Thisara Perera straight down the ground for four to go to 99. But, much to his annoyance, he cut the next delivery, which was short and wide, low to backward point where the substitute Dimuth Karunaratne dived to take the catch.
"I was hoping the umpires would go upstairs on the catch, but when Rod Tucker asked me if I wanted to refer it, I said 'No, just ask the fielder'," De Villiers said.
"I back the fielder. If he says he's caught it then that's fine with me.
"It was a poor shot I played, it should have been in the gap but I didn't do that and that's the end of the story."
Marvan Atapattu, the Sri Lanka batting coach, praised the batsman's gesture.
"You don't see that very often, especially in the 90s, it was a nice gesture," he said. "The fielder was pretty sure it was a clean catch. I, myself, looking from the outside, was not that sure. Personally, I wouldn't have done what AB did, to be very honest."
De Villiers showed determination and concentration in his 135-ball innings that was studded with fine strokeplay and contained 12 fours.
Ashwell Prince and Mark Boucher, both under pressure to keep their places in the team, were also able to rise to the occasion as South Africa's lower order more than doubled the score after they had been struggling on 173 for five.
Prince scored 39 before he edged Angelo Mathews, the mediumpacer, to Kaushal Silva, the wicketkeeper, but the left-hander could consider himself fortunate to have survived two dropped catches.
He was dropped by Perera, diving forward in the gully, off Dilhara Fernando on 23, and by Silva off Rangana Herath, the left-arm spinner, when he had 26.
Boucher finished the day on 49 not out, hitting six fours in a knock that would have eased the pressure on the veteran wicketkeeper.