The first half ended goalless as neither side was truly able to get going on a heavily-sanded pitch, the hosts mustering slightly more possession on the difficult surface.
Chances remained at a premium in the latter stages of the game, though the League One side continued to ask questions from their second-tier opponents.
Keith Hill's charges were eventually able to see the game out to secure a fifth-round tie against either Tottenham Hotspur or Newport County.
ROCHDALE (3-5-2): Lillis; McGahey, McNulty, Delaney; Rafferty, Cannon, Camps, Kitching, Done; Henderson, Andrew
MILLWALL (4-4-2): Martin; McLaughlin, Hutchinson, Shackell, Meredith; Tunnicliffe (Gregory 63'), Williams, Thompson, Ferguson (Morison 63'); Elliott, Onyedinma (Wallace 77')