1, the Pakistan Cricket Board (PCB) said on Sunday.
A PCB spokesman said the decision followed a request from the touring team's management.
"They have taken this decision after considering the conditions and duration of the tour in South Africa," the spokesman said. "Both players will arrive before the first test."
The team already includes pace bowlers Umar Gul, Junaid Khan, Mohammad Irfan and uncapped Ehsan Adil.
Tanvir, 34, who has played four tests, made his last appearance in a one-day match against Ireland last year.
Left-armer Rahat has played just one one-day international against Sri Lanka.
- Sports & Recreation
- Pakistan Cricket Board
- Mohammad Irfan
- Junaid Khan