Rashid grabbed five wickets as Pakistan’s collapse in the final session had given England a 99-run target.
England were 46 for two wickets against Pakistan at stumps on the penultimate day, setting up an exciting finale where they chase 284 to win the third and final Test and draw the series.
Captain Alastair Cook was 17 not out with Joe Root on six after Moeen Ali and Ian Bell were dismissed by Shoaib Malik in the space of two overs.
Having taken a first-innings lead of 72, England finally dismissed Pakistan for 355 in their second-innings, with opener Mohammad Hafeez making 151.
Pakistan, who have never lost a series in the United Arab Emirates since their home matches were moved there in 2010, won the second Test by 178 runs after the first was drawn.
They struck two heavy blows in the last session when Malik, playing in his last Test, dismissed Moeen Ali and then Bell in quick succession with the score on 34.
Moeen, who has been unable to make a success of his role as opening bat, fell leg before for 22 and Bell lost his off stump without scoring.
Root, who survived a controversial leg-before decision as Pakistan used up their final DRS review, stayed in until the close along with Cook, and at least one of them must make a big total if England are to score the 238 runs still needed.