The Liquor Control Reform Act sets out that it is only unlawful if the beverage or other prescribed substance has an alcoholic content greater than 0.5% by volume at a temperature of 20° Celsius.
In answer to your question: Yes, a person under the age of 18 can purchase non-alcoholic beer.