Substitute Ben Whiteman struck in the 78th minute after Bury centre-back Eoghan O’Connell had been sent off in first-half stoppage-time for bundling over John Marquis and it had looked like the hosts might hang on.
Defeat at Walsall the previous week had prompted Ferguson to axe Liam Mandeville and the player’s poor response resulted in him being left out of the squad.
“It was important we got a reaction from last week. It’s been a long week. It certainly felt like a long week,” said Ferguson.
“Everyone got the reaction from the players and it was a thoroughly deserved victory. We had to dig it out. I spoke to them at half-time about not getting frustrated and told them we’d get the chances, but it might be the last minute. Whiteman then produced a real bit of quality, a fantastic finish.”
On Mandeville, he said: “I’ve got to make decisions and I’ve got to be ruthless at times.
“His reaction to not playing was not great either. He knows himself that last week he was nowhere near the standards I expected from him.
“If I’m going to be a manager that trusts him to deliver performances then mentally he’s got to be stronger.”
Ferguson said Mandeville will play in tomorrow night’s Checkatrade Trophy game against Scunthorpe United.
Bury: Murphy, Humphrey, Edwards, O’Connell, Aldred, Leigh, Reilly, O’Shea (Mayor 82), Ince (Tutte 61), Beckford (Maguire 38), Smith. Unused substitutes: J Williams, Laurent, A Dobre, Fasan.
Doncaster Rovers: Lawlor, Alcock (Whiteman 61), Wright, Butler, Baudry (Williams 67), Toffolo, Kongolo, Houghton, Rowe, Marquis, Coppinger. Unused substitutes: Mason, Marosi, Garrett, Beestin, Ben Khemis.
Referee: A Haines (Tyne & Wear).