The 40-year-old, who is the most successful left-arm bowler in the history of Test cricket with 418 wickets in 90 games, is gearing up for the two-Test series against the Proteas starting in Galle on Thursday.
Herath retired from the shorter formats in 2016 to prolong his Test career but admits that could now be coming to an end.
After the series against the Proteas, Sri Lanka will host England in November and the slow-bowler could call it quits following that series.
Herath told BBC Sinhala: "Maybe my final series will be the England series later in the year.
"Following this South Africa series, there is another three months until the England series.
"For now, this is what I've planned for. There comes a time for every cricketer, when they have to stop playing. I think that time has come for me."
Herath is the last remaining international cricketer to have made his debut in the 1990s, earning his first Sri Lanka cap in September 1999.
However, it was only after the retirement of spin great Muttiah Muralitharan in 2010 that Herath's career took off as he became Sri Lanka's first-choice slow-bowler.
Herath continued: "I'm really glad I've been able to play as long as I have. But the most important thing is that of those 18 years, I wasn't able to play for Sri Lanka for about seven of those years.
"I'm proud of what I was able to do in those seven years - the training I did, and the desire I had, especially."