The two sides, contesting the second leg of their semi-final tie at the Bernabeu, were level at the break after goals from Joshua Kimmich and Karim Benzema.
However, the hosts went 2-1 ahead shortly after the interval when Ulreich attempted to collect Corentin Tolisso's back pass, only to seemingly realise that he was unable to use his hands.
Ulreich subsequently slipped and Benzema scored his second of the night, and although James Rodriguez drew Bayern level again, the Bundesliga side could not find another goal to see them through to the final, with Real winning 4-3 on aggregate.
"Words cannot describe how disappointed I am about leaving the Champions League," Ulreich wrote on his Instagram page.
"We really wanted to reach the final and we did our best and then this unnecessary mistake happened to me. I cannot explain it. I'm sorry... for my team and for you fans."
Ulreich has made 44 appearances this season in the absence of the injured Manuel Neuer.