Rabada moves ahead of Steyn to become South Africa highest-ranked bowler, New Zealand just a win away from leapfrogging Pakistan into fifth position.
South Africa win by an innings and 118 runs to sweep series 3-0 after Sri Lanka lose 16 wickets in just over two sessions.
Sri Lanka lost four wickets on 80 in uphill response before bad light forced early stumps, need 147-run to avoid follow-on.
Hashim Amla became the eighth player to score a century in his 100th Test as he guided South Africa to 338 for three at stumps on Day 1.
Sri Lanka has named uncapped all-rounder Thikshila de Silva in a 15-member squad for the three Twenty20 internationals against South Africa later this month.
Sri Lanka, trailing 2-0, will want its batsmen to step up for final Test starts from Thursday in Johannesburg.