Answer:
Yes, it can fit in.
Using Pythagoras theorem:
Find bottom side, hypotenuse
a² + b² = c²
6² + 21² = (bottom side)²
bottom side = √477
bottom side = 3√53 cm
Then find upper diagonal, hypotenuse
(3√53)² + 5² = diagonal²
diagonal = √502
diagonal = 22.4 cm
Thus the wand can fit in the box diagonally.