Klaasen's 68 not out — to go with a century and another half century in the series — led South Africa to a comfortable victory despite Marnus Labuschagne's 108 for Australia against his country of birth. It was his first ODI hundred.
Labuschagne was the anchor but Australia only managed 254-7 in its 50 overs at Senwes Park in Potchefstroom after being put in to bat. Labuschagne's century came about 50 kilometers (31 miles) up the road from Klerksdorp, the city where he was born.
Labuschagne left South Africa as a child when his family emigrated to Australia.
JJ Smuts made a career-best 84 from 98 balls in South Africa's chase while filling in at No. 3 for the injured Temba Bavuma. Klaasen was there at the end to confirm victory with nearly five overs to spare. South Africa finished on 258-4 in 45.3 overs as Klaasen sealed it with three boundaries in a row off Mitchell Marsh; a four through square leg, another through the covers, and a six over long-on.
Klaasen has only been on the fringes of South Africa's limited-overs teams but may now have cemented himself a place in the lineup for the ODI tour to India this month.
Australia was missing pace bowlers Mitchell Starc and Pat Cummins and spinner Ashton Agar.
Starc left the tour early so he can watch his wife Alyssa Healy play for Australia in the women's Twenty20 World Cup final at the Melbourne Cricket Ground on Sunday.
Cummins and Agar were rested after Australia went 2-0 down in the three-game series.
South Africa rested Lungi Ngidi and gave an international debut to fast bowler Daryn Dupavillon, who took 1-21 off six overs. His wicket was that of Australia captain Aaron Finch for 22.
Smuts won man of the match after also taking two wickets with his left-arm spin bowling to go with his top score for South Africa.
Australia won the T20 series last month but finished its first tour of South African since the ball-tampering scandal of 2018 on a low.
South Africa's difficult home season ended with its first series victory of the summer. The Proteas lost test and T20 series against England earlier this year, and drew their ODI contest.