Despite their recent cup exploits, the hosts had not won a league game since December 21 but took all three points after Dave Edwards headed in the winning goal on 76 minutes.
Chances were few and far between in the opening 45 minutes, with Ben Sheaf spurning the best chance for Rovers when he fired a shot high and wide just before the half hour.
Seny Dieng was left with little to do at the other end as the Doncaster defence held firm.
Three minutes into the second half, Josh Laurent had a superb opportunity for the home side but lashed his shot over the bar from inside the area.
Ben Whiteman then had an effort tipped around the post a minute later with a shot that looked destined for the top corner.
Jacob Ramsey struck the post five minutes later after Rovers quickly went from one end to the other.
The hosts began to look more threatening after the hour and took the lead when Edwards headed in Callum Long's cross at the far post.
Cameron John had a great chance to level the scores but was denied by the on-rushing goalkeeper.
The result leaves Doncaster in 11th, six points of the League One play-off places.