With the score tied 1-1, O'Reilly scored on the rebound of a Gabriel Landeskog shot 37 seconds into the final frame and the Avalanche went on to log their fourth straight win.
Semyon Varlamov made 27 saves to earn the victory.
The Ducks remained six points out of a playoff berth in the West with only their third loss in nine contests.
Bobby Ryan scored and Jonas Hiller yielded four goals on 23 shots for Anaheim.
Moore to attend retreat in to avoid Kutcher's wedding
Yosemite climber falls 30 feet, suffers major injuries