Nope. tried it. Lost two event crystals as a result, and yes it sucks. It's not technically the Pokémon holding it. The icon saying it is 'holding' something is just symbolic, as you the player are actually holding it on your Z-ring. Every time you try to trade a Pokémon that is 'holding' a Z-crystal, it is automatically removed beforehand.