Dale had to come from a goal behind to carve out the three points, Matt Lund's fortuitous effort cancelling out a stunning strike from Piero Mingoia - before Bunney stole the show.
Stanley midfielder Peter Murphy had the best effort of an uneventful, scrappy first half when he met Mingoia's low cross with a snapshot which flew narrowly wide of Josh Lillis' near post.
Mingoia broke the deadlock in the 72nd minute when he punished the Dale defence's inability to clear their lines from a corner. When the loose ball dropped to him on the edge of the area and he volleyed home from 20 yards.
Rochdale had an effort chalked off soon after, Ian Henderson's scissor kick into the roof of the net ruled offside. But they equalised on 77 minutes when Dean Winnard's attempt to head clear a Joe Rafferty cross hit Lund in the face and flew past goalkeeper Marcus Bettinelli.
And Dale grabbed the win in stoppage time when Bunney stabbed home from close range after Bettinelli had saved his initial header.