Minecraft Education Edition has an educational setting designed to manage destructive items. When enabled, players may use harmful potions, explode TNT, allow lava to destroy things and fires to spread.
Educators can choose to turn this on or off by going to the classroom settings and selecting Allow Destructive Items.
You can also type the follow commands into the chat:
For advanced control, you may also like to consider using repeating command blocks to restrict access to particular items in the inventory.