Given that 'X' reacts with LiAlH$_4$ to give a toxic gas 'Y', and 'Y' when heated with NH$_3$ gives inorganic benzene, we can identify 'Y' as borane (BH$_3$) or its derivatives, which are known to form inorganic benzene.
- Borane (BH$_3$) is a highly reactive compound and burns in oxygen to form water (H$_2$O).
- Upon combustion, borane (BH$_3$) forms boron oxides, which are acidic in nature.
Therefore, 'Z' is an acidic oxide, as it reacts with water to form an acidic solution.
Thus, the correct answer is acidic oxide.