Rabada is a huge figure in the South African seam attack and his loss would be a massive blow
Sri Lanka, who had conceded a 109-run lead, were bowled out for 113 in their second innings as Nathan Lyon (4-31) wrecked their top order and part-timer Travis Head (4-10) polished off the tail.
Needing only five runs to win, opener David Warner hit Ramesh Mendis for a four and followed it with a six to seal Australia's victory in four deliveries.
Galle also hosts the second Test from Friday.