Full scorecard - via ESPNcricinfo
Earlier, Sri Lanka had made 279/7 in 44.4 overs before rain intervened.
The South Africans were then set 188 to win in 25 overs.
Kyle Abbott (3/37) was South Africa's most successful bowler, while Wayne Parnell (2/44) also chipped in with two wickets.
Openers Quinton de Kock (66 off 55 balls) and Hashim Amla (46 off 40 balls) were South Africa's most successful batsmen.
South Africa's next warm-up match is on Wednesday against New Zealand - again at the Hagley Oval. They open their World Cup campaign against Zimbabwe in Hamilton on Sunday.