The Millers claimed a 2-0 victory over their Yorkshire rivals to leapfrog third-placed Burton on goal difference with two games remaining.
They had to wait for their goals, Lee Frecklington opening the scoring with an 80th-minute penalty and Kieran Agard sealing the points in the closing seconds.
Only two play-off places now remain open, with the defeated Bantams and Northampton currently occupying them.
Northampton could have confirmed their spot with victory over Wycombe but instead claimed a goalless draw and sit five points ahead of Exeter in eighth with six still to play for.
At the wrong end of the table, bottom club Aldershot took another step closer to non-league football as they were beaten 2-0 at home by Southend.
Another key relegation contest between Torquay and Barnet ended with hosts Torquay winning 3-2 to exit the bottom two, creating a vacancy which their opponents duly filled.
Elliot Benyon put Torquay ahead in the 25th minute and despite a brace from substitute Jake Hyde, efforts from Billy Bodin and Brian Saah saw the home side over the line.
Barnet lie one point worse off than York, AFC Wimbledon and Torquay.
In the final fixture Plymouth were 2-1 winners at Chesterfield. Joe Bryan and Curtis Nelson scored twice in five first-half minutes before Guy Branston's own-goal reduced arrears.