Cornish Pirates briefly went above Knights in the standings after earning two bonus points from a 32-31 defeat at Jersey earlier in the afternoon.
A draw would not have been enough to prevent Doncaster dropping to fourth spot but, with the teams level at 24-24 and the clock on 80 minutes, Pocklington latched onto Connor Joyce’s offload to seal a bonus point win.
The winning try, which sparked great celebrations as fans returned to Castle Park for the first time since March last year, capped a superb shortened season for Steve Boden’s side.
Knights won eight out of ten games and only big-spending Ealing Trailfinders and mighty Saracens finished above them in the table.
Doncaster Rovers player ratings from the dramatic draw at AFC Wimbledon
Recap as Doncaster Rovers produce stirring comeback to draw at AFC Wimbledon
The Doncaster Rovers team expected to take on AFC Wimbledon
Doncaster Rovers: Birthday boy Gary McSheffrey has got the buzz for his unexpected management shot
Gary McSheffrey delivered this verdict following Doncaster Rovers' late show at AFC Wimbledon
Boden’s first season in charge has coincided with a big turnaround in fortunes for Knights who had finished 7th, 10th and 10th since reaching the play-offs in 2016 and 2017.
Matt Challinor captained Knights as he made his final appearance for the club after 11 years at Castle Park, while long-serving hooker Ben Hunter and Premiership-bound Robin Hislop also played their final games for Doncaster.
First half converted tries from Howard Packman and Gus Warr gave Knights a 14-7 lead at half time.
Lowly Nottingham threatened an upset when they scored two converted tries following the re-start but Will Holling crashed over on 65 minutes and Sam Olver kicked his third conversion to level the game at 21-21.
Both sides then traded penalties before Pocklington’s last gasp try.