A 19-year-old man caught by police behind the wheel after inhaling nitrous oxide has been fined and banned from driving.