The game boiled down to New Zealand skipper and century-maker Kane Williamson needing a six off the final ball as they chased a 235 target.
But he was unable to deliver, leaving New Zealand on 230 for eight as England went 2-1 up in the five-match series.
New Zealand appeared to have the game in their hands at 80 for one in the 18th over, before Ali and Rashid turned the match with five wickets for 23 runs in a 41-ball burst.
Ali finished with three for 36 and Rashid took two for 34.
They were assisted by a stunning catch from Ben Stokes diving to his left to remove Colin Munro (49) to ignite the New Zealand slump from a comfortable 80 for one to 103 for six.
Williamson, who had struggled for runs in recent innings and missed the second ODI, which England won, because of a hamstring strain, returned to the arena with an imperious performance for his 11th ODI century.
He faced 143 deliveries and was in the middle for most of the New Zealand innings after the early dismissal of Martin Guptill for three.
Williamson shared a 68-run stand with Munro, and once Ali and Rashid had destroyed the rest of the recognised New Zealand batting he engineered a revival with Mitchell Santner.
Santner was given the benefit of the doubt on two when Jason Roy took a catch at ground level and there was no clear evidence the ball had not touched the grass.
From there he was more circumspect to reach 41 before being run out when a Chris Woakes attempt to stop a Williamson drive deflected off the bowler's fingertips and on to the stumps, with Santner caught out of his crease.
Woakes, defending 15 runs in the final over, conceded two twos and a six to Williamson and then fired in two dot balls to prevent a New Zealand victory.
England, having been sent into bat first, struggled to 234 in an innings built around a 71-run stand for the fourth wicket by Eoin Morgan and Stokes.
Although the wicket offered variable bounce it held no serious demons, and the top nine England batsmen all reached double figures.
Their problem was no one could settle in long-term, and New Zealand part-time medium pacer Colin de Grandhomme was allowed to bowl 10 overs in which he took one for 24.
Ish Sodhi was more expensive with his leg breaks but still claimed three wickets for 53, while there were three late run outs as England pushed for runs at the end of their innings.
Morgan top scored for the tourists with 48 off 71 while Stokes, the England hero when they won the second ODI three days ago, contributed 39 off 73.
The fourth match in the series is in Dunedin on Wednesday.
First Published: March 4, 2018, 8:30 AM IST