At the moment, that is possible, Madrid are in a difficult situation with La Liga currently being severely hampered by Barcelona and the Champions League being a slim chance despite leg 2, so it is possible that Perez will look for an alternative coach to replace Ancelotti.
Yes, in fact, although you're absolutely right about what you said, I think they'll wait until the end of the season to see Ancelotti leave Ancelotti is a highly respected coach , and he doesn't deserve such treatment either I think he deserves to finish both the season and the UCL, regardless of the result.
It's a fact that Barcelona is the most dominant team so far, and if Madrid doesn't get their act together, they'll lose absolutely everything, so now is when Ancelotti needs to show his mettle.