The Black Caps then return to India for three tests against the ICC’s second-ranked test side.
Rathour’s stint with the side is limited to the Afghanistan test.
Coach Gary Stead said the pair would bring new knowledge to the group, along with insights into local conditions.
“We’re really excited to introduce Rangana and Vikram into our test group,” he said. “Both men are held in high regard in the world of cricket and I know our players are really looking forward to the opportunity to learn from them.
“For our three left-arm orthodox spinners in particular, Ajaz, Mitch and Rachin, having the chance to work with Rangana across three tests on the subcontinent will be hugely beneficial.
“Rangana has taken over 100 test wickets in Galle, which is the venue of our two tests against Sri Lanka and so his knowledge of that venue will be priceless.”
The epic tour marks the first time the New Zealand men have played six straight tests on the subcontinent since 1984. On that occasion, there was an eight-month break between a 2-0 series win over Sri Lanka and a 2-0 defeat in Pakistan.