De Villiers made 63 off 44 balls in a South African total of 169 for five but Sri Lanka won by five wickets with one ball to spare to regain some pride after being outplayed in a three-match Test series.
"I'm over the moon," said stand-in Sri Lankan captain Dinesh Chandimal yesterday. "After losing the Test series, I'm really happy with the way we played."
Dickwella was named man of the match and man of the series after making useful contributions in all three matches.
South Africa dropped five catches - including three off successive balls in one over from Wayne Parnell - and were hampered by an injury to fast bowling discovery Lungi Ngidi, who left the field after bowling only two of his potential four overs.
Also Read
Sri Lanka, though, could take pride in overcoming the loss of injured captain Angelo Mathews, who played a match-winning innings to level the series in the second match in Johannesburg last Sunday. "Angelo is a big part of this win," said Chandimal.
Playing in his first international match after recovering from an elbow injury which kept him out of action for six months, De Villiers made a cautious start, with his first run coming off the fifth ball he faced.
His first six runs were singles but he gradually increased his range of strokes, hitting left-arm spinner Lakshan Sandakan for a straight six and pulling a short ball from Asela Gunaratne for another six as he went to his ninth T20 international fifty off 35 balls.
With Behardien having been run out three balls earlier, it meant South Africa lost two experienced, explosive batsmen in quick succession.
Mangaliso Mosehle hit three sixes in the final over, however, to enable South Africa to post a competitive total.
The left-handed Dickwella provided the foundation for Sri Lanka's win with a 71-run third-wicket partnership with Dhananjaya de Silva. But leg-spinner Imran Tahir dismissed both batsmen in the 16th over to give South Africa a chance before Prasanna's uninhibited hitting took Sri Lanka over the line.
Disclaimer: No Business Standard Journalist was involved in creation of this content