The Championship game was locked 15-15 when the ex-Rotherham Titans player popped up to make it 20-15 in the 68th minute.
Doncaster had taken the lead via Josh Tyrell following a driving maul, New Zealander fly-half Kurt Morath improving.
However, their discipline then waned and they watched Shane O’Grady kick four penalties before Mortath replied with one of his own to see them trail 12-10 at the break.
Stevie McColl cruised over at the start of the second half for the visitors’ second try.
But another O’Leary penalty levelled it just before the hour mark before Scanlon came up with that decisive score.
Yorkshire Carnegie’s wretched start to the season continued as they lost 36-19 at Jersey Reds – the Championship’s bottom team.
Chris Stirling’s side were outplayed by opponents who had lost all four games previously.
Indeed, Jersey led 31-7 at the break having already secured a try-bonus point.
Carnegie have won just once in their five outings so far and are clearly in crucial need of strengthening their squad.
Tom Bullough scored their only try in the first period when all the damage was done.
Admittedly, they responded at the start of the second half when Brendan Cope broke clear to send Chris Elder in for their second but fly-half Cope was injured in the process and had to depart.
Elder took over kicking duties and improved the try.
Jersey – who head to Doncaster next Saturday – added their fifth try late on but Carnegie gained a consolation through captain Dan Temm with the final play. They host Bedford next Sunday.