It probably is illegal to ride a bike on the Autoroutes. But I am not aware of rules that forbid riding on secondary highways and the less-travelled roads between towns and cities.
When I rode across Charlevoix, I biked only on secondary roads. But it was unnerving at times because of the unending stream of logging trucks.