With Deadpool being an MCU movie, how can it make direct references to mutants and Xavier's Mansion when the previous Avengers movie, Avengers: Age of Ultron, couldn't? Likewise in Agents of Shield they have created Inhumans instead of mutants.
Firstly, Deadpool is a Fox Live Action Studios production meaning Mutants and Xaviers School are fair use.
The Brand 'Mutant' was sold to Fox along with characters from the MU comics. This means Marvel can't refer to Mutants and Fox can't refer to Avengers.
Rumours are circulating that Fox is going to sell its MU properties back to Marvel Studios which would help to clear up a lot of the confusion regarding what is canon and especially when it comes to overlapping or shared characters with differing timelines.
At all times that Deadpool is around, movie or otherwise, the fourth-wall is rendered invisible. I've read that part of his insanity in the comics is actually because he knows he's a fictional character.
So him referencing things that may not be in the same universe is part of the humor (like gags that are supposed to cause you to wonder 'how did blank do/know blank?').