Rizwan and Irfan both suffered hamstring injuries in the third match in Rawalpindi, where a second-string New Zealand side won by seven wickets to level the five-match series 1-1
It will be the first time the Gulf country, coached by former Sri Lanka captain Duleep Mendis, have reached a major international tournament.
Afghanistan beat Papua New Guinea by six wickets to claim the other qualifying place and book a spot in the tournament for the fourth time in a row.
Scotland, Ireland, Hong Kong and the Netherlands will also join the 10 test-playing nations in the 16-team tournament.