O'Connell got on the end of Matty Done's inswinging free-kick after 51 minutes to nod home from close range and seal the victory.
And he performed heroics at the other end when he cleared Harry Toffolo's header off the line on the stroke of full-time.
It was a deserved win for the visitors who soaked up plenty of pressure from Town with a resolute defensive display.
The Terriers had enjoyed the best of the first half with Toffolo and Juninho Bacuna both blowing good chances but the lacklustre Championship side ran out of ideas in the second half with Dale keeper Gavin Bazuna rarely called into action.
Huddersfield started in confident fashion with Josh Koroma firing weakly at Bazuna after he cut inside with nine minutes gone. Bazuna beat away a cross-shot from Koroma after 16 minutes as Huddersfield continued to control the game.
Dale were left fuming after the referee ruled out Done's close-range goal for offside after 21 minutes despite the linesman appearing to not raise his flag.
Toffolo sent a powerful header over after he beat his man to Alex Prichard's cross two minutes later. Pritchard had a shot blocked on the edge of the box after finding space as the Terriers started to turn up the pressure.
Jimmy Ryan blazed a rare effort high and wide with 32 minutes gone as the visitors came back into the game.
Koroma was then unable to get a shot away after he beat three men following a surging run into the box.
Bacuna fired over a minute before the break after Danny Warn picked him out with a pinpoint cross.
O'Connell headed home from inside the six-yard box to give Rochdale a 51st minute lead after Done's inswinging free-kick split the defence.
Ward fired wide at the back post after getting on the end of Aaron Rowe's deep cross after 57 minutes.
The game was briefly stopped with 65 minutes gone after the linesman injured himself when he fell over after signalling an offside.
Pritchard fizzed a cross across the face of the box as Huddersfield's players failed to gamble and get into the box.
Romoney Crichlow smashed an effort well over from distance before shouts for a penalty were waved away after Bacuna took a tumble.
Isaac Mbenza had a powerful shot beaten away for a corner before O'Connell cleared Toffolo's header off the line on the stroke of full time.