As far as I understand it, a MegaEvolution is inevitable, and happens before your chosen attack for the turn. Correct me if I'm wrong though...
We'll have to see, but if it were possible, why wouldn't they choose to MegaEvolve, especially if the opponent has a Pokemon that can learn Knock Off?