Skipper Dimuth Karunaratne was out on the first ball of the match when he tried to fend away a short ball from Kagiso Rabada.
The Sri Lankans recovered to reach 67-1 in the 10th over before Pretorius struck for the first time, having Avishka Fernando caught at mid-off after scoring 30 from 29 balls.
He bowled Kusal Perera (30) in his next over and, after Chris Morris removed the dangerous Angelo Mathews (11) he returned to dismiss Kusal Mendis (23) to have Sri Lanka in serious trouble at 111-5 in the 27th over.
He finished with 3-25 from his 10 overs.
West Indies allrounder Carlos Brathwaite has been fined 15% of his match fee for showing dissent at an umpire's decision in the loss to India on Thursday in Manchester.
The incident occurred in the 42nd over of India's innings, when Brathwaite protested a call of wide off his bowling.
He admitted the offence and accepted the sanction from match referee Chris Broad.
Brathwaite has two demerit points from the tournament. He was sanctioned for a similar offence on June 14 against England in Southampton.
After losing skipper Dimuth Karunaratne on the first ball of the match, Sri Lanka has recovered to reach 67-2 against South Africa after 10 overs of their group game.
Karunaratne tried to fend away a short ball from Kagiso Rabada and angled a looping catch to opposing captain Faf du Plessis at second slip, becoming the second player to be dismissed on the first ball of a game at this tournament. New Zealander Martin Guptill was out first ball of the match against the West Indies last week.
Avishka Fernando scored 30 from 29 balls before he was caught off Dwaine Pretorius's bowling on the penultimate ball of the 10th over.
Kusal Perera was unbeaten on 28 after 10 overs.
South Africa skipper Faf du Plessis has won the toss and sent Sri Lanka in to bat in the Cricket World Cup group game at Durham.
Sri Lanka is still in contention for a playoff spot after its upset win over England. Nuwan Pradeep has been sidelined with an illness and has been replaced by paceman Suranga Lakmal in the only change to the Sri Lanka lineup that beat England last Friday.
South Africa is out of contention with just one win from its opening seven games and made two changes to its starting XI, with veteran JP Duminy coming in for David Miller and Dwaine Pretorius starting in place of fast bowler Lungi Ngidi.
A win would move Sri Lanka to eight points, equal with England, with games remaining against West Indies and India.
Lineups:
Sri Lanka: Dimuth Karunaratne, Kusal Perera, Avishka Fernando, Kusal Mendis, Angelo Mathews, Dhananjaya de Silva, Jeevan Mendis, Thisara Perera, Isuru Udana, Suranga Lakmal, Lasith Malinga.
South Africa: Hashim Amla, Quinton de Kock, Faf du Plessis, Rassie van der Dussen, Aiden Markram, JP Duminy, Dwaine Pretorius, Andile Phehlukwayo, Chris Morris, Kagiso Rabada, Imran Tahir.
Sri Lanka is aiming to follow its upset win over No. 1-ranked England with a victory over South Africa in Durham on Friday to maintain its chance of reaching the World Cup semifinals.
Sri Lanka's win over England was the start of a sequence of results that removed some predictability in the playoff combination and put pressure on the tournament hosts.
In head-to-head contests, the Sri Lankans have lost 16 of their last 18 one-day internationals against South Africa, including the last five, but are growing in confidence on the back of performances from veterans Lasith Malinga and Angelo Mathews.
South Africa is already out of contention after winning just one of its first seven games at the tournament.
Two Sri Lanka's six competition points come from washed out games earlier in the tournament.
The weather forecast for Durham is for a cloudy start, clearing to sunny in the afternoon.