Normally, knock off would deal extra damage to a Pokemon with an item and then take it away. Mega stones however, can not be knocked off, only if the mega stone is being held by the respective Pokemon - don't know why some one would have it on a different Pokemon.
Other qualities that knock off doesn't work on are:
- girantina's griseous orb
- plates for arceus
- drives from genesect
- Pokemon with sticky hold
- Other items like focus band would activate, then get stolen
Stolen items will return in the end!
Hope this helped!