As a bike owner/rider it is your own responsibility to make sure that your bicycle complies with the law.
Most Canadian provinces have laws describing which lights and reflectors your bicycle as a minimum must have, so please familiarize yourself with the requirements for your province.
Highway Traffic Regulation, Alta Reg 155/1997 states the following:
"Prohibition re flashing lights. No person shall have on a highway a vehicle that is equipped with one or more flashing lights unless the vehicle is authorized to be equipped with those lights under the Highway Traffic Act or this Regulation."
The lighting requirements are mandatory if you are riding between half an hour before sunset and half an hour after sunrise, or anytime visibility has been reduced to the point where you cannot see 150 meters ahead.