The draw was made in Australia on Wednesday.
New Zealand was drawn in Pool A with Australia, Chile and Hong Kong, with the trans-Tasman rivals likely to open the tournament with a game in Perth.
Should the All Blacks and South Africa both win their pools and their round-of-16 matches, they will meet in the quarterfinals.
The winner of that game would probably face France in the semifinals, with England a likely final opponent.
The six pools in the extended tournament, which now includes a round-of-16 before the quarterfinals, are:
Pool A: New Zealand, Australia, Chile, Hong Kong
Pool B: South Africa, Italy, Georgia, Romania
Pool C: Argentina, Fiji, Spain, Canada
Pool D: Ireland, Scotland, Uruguay, Portugal
Pool E: France, Japan, USA, Samoa
Pool F: England, Wales, Tonga, Zimbabwe.