AB de Villiers made a patient, unbeaten half-century as South Africa closed on 238 for five in their second innings at Newlands, extending their advantage to 294 runs on a wicket that has significant sideways movement.
Yet attention was diverted from the match situation when Bancroft was spoken to by the umpires regarding an object that television footage appeared to show him take out of his pocket before shining the ball.
He was then shown putting the object down the front of his trousers before speaking to the on-field officials Nigel Llong and Richard Illingworth.
Bancroft turned out his pockets and showed the umpires a black piece of cloth and play continued with the hosts tightening their hold on the match.
De Villiers is not out on 51 from 103 balls and will resume on the fourth morning with the more attacking Quinton de Kock, who had bagged 29 from 33 balls.
De Villiers is known for his swashbuckling style, but in the face of some excellent seam bowling from the tourists, chose to accumulate runs and ensure South Africa did not suffer a batting collapse similar to their first innings capitulation.
Opener Aiden Markram’s 84 had earlier included a mixture of fine stroke-play and luck. He was dropped twice in his innings by Usman Khawaja before he had scored and again by Australia captain Steve Smith when he was on 59.
He was out three minutes before the tea interval though when he chipped a Mitchell Starc delivery to Pat Cummins at mid-on.
Dean Elgar (14), who carried his bat for an unbeaten 141 in the first innings, could not repeat that feat as he was the first batsman out, edging Cummins (2-47) to Steve Smith at second slip.
Hashim Amla (31) then drove Cummins to Bancroft at short mid-wicket, while Faf du Plessis’ run of low scores continued as he was trapped leg before wicket by Nathan Lyon for 20.
Temba Bavuma (5) lasted just four balls before he edged to substitute fielder Peter Handscomb at second slip to give Josh Hazlewood his first wicket of the innings.
De Villiers and De Kock took South Africa to the close without further incident with an unbeaten stand of 37 for the sixth wicket.
The four-match series is poised at 1-1, with the final test to be played in Johannesburg starting on Friday.
BRIEF SCORES: South Africa 311 & 238/5 in 72 overs (A Markram 84, H Amla 31, AB de Villiers 51*, Q de Kock 29*, P Cummins 2/47, J Hazlewood 1/46) vs Australia 255 in 69.5 overs (C Bancroft 77, D Warner 30, T Paine 34, N Lyon 47, K Rabada 4/91, M Morkel 4/87).