McKee netted the opener and Eugene Magee slotted home before O'Donoghue's drag-flick made it 3-0 at half-time.
O'Donoghue added the fourth and, after Patryk Bulka pulled one back, McKee netted to seal victory.
Ireland face Wales in Saturday's semi-final with the winners guaranteed a spot in the final and World League 3.
France and Scotland will contest the other semi-final at the east Belfast venue.
"In a must-win game, there will always be tension. These are difficult games - it's a quarter-final and must-win," said Ireland coach Craig Fulton.
Media playback is not supported on this device
"Whether you play beautifully or it's pretty, it doesn't matter. The result is everything.
"We did well in the first quarter but couldn't put a final pass on it. They are a difficult team to play against and Mateusz Poltaszewski is a good player and controlled things for a while.
"But once we got one, two and three that put them under a lot of pressure. We pressed well. The stepping forward from us was really good. All respect to Poland, we maybe left three or four more goals out there.
"Where we are getting the ball are really good areas. It is building."
Ireland: D Harte, J Bell, M Bell, R Gormley, M Nelson, E Magee, N Glassey, S O'Donoghue, J McKee, P Gleghorne, C Harte.
Subs: B Walker, C Cargo, S Murray, J Duncan, L Cole, J Wright, J Carr.
Poland: R Banaszak, M Raciniewski, M Gumny, D Kotulski, S Sellner, M Hulboj, J Janicki, R Wisniewski, A Krokosz, P Bratkowski, M Poltaszewski.
Subs: P Bulka, B Zywiczka, R Gruszczynski, P Pawlak, J Kurowski, K Sudol, M Popiolkowskia.
Umpires: V Ilgrande, I Diamond
Johnny McKee and Shane O'Donoghue both scored twice as Ireland hammered Poland 5-1 in the World League 2 quarter-final at Stormont on Thursday.