There is an old legal concept - ignorance of the law is no defence.
The idea is that no one can defend a charge by saying they didn't know what they had done was illegal. The law must apply equally to everyone and both the most ignorant and the most knowledgeable have to follow the same rules.
The problem is that knowing what the law is is not always easy.
The concept that everyone is assumed to know the law makes very good sense when you are dealing with offenses that are obviously wrong; say assault or theft. You don't need to be told that hitting someone or stealing their stuff is wrong. Even if there was no law against assault or theft common human understanding would tell you that they are wrong.
The problem is that many modern laws, especially regulatory offenses, prohibit things that are not obviously wrong.
For example, fishing requires a license and regulations limit the catch you are allowed to take. But there is no common human understanding that taking six Arctic char is ok but eight Arctic char is not acceptable.
But it remains illegal to overfish even if you don't know that what you are doing is wrong. It is still no defence to say "I didn't know it was wrong".
The Income Tax Act is amazingly complex – even the smartest lawyers and accountants have trouble figuring out all the details. But everyone is required to follow the same rules and pay their taxes accordingly. And if you breach those very complex rules you may be committing an offence.
So what do you do?
The answer is to recognize that whenever you are doing something that is regulated you need to find out what the rules are.
So when you are doing your taxes that means reading the forms carefully or getting an accountant to help you get it right.
Fishing is another example. You may not know that you are limited to six Arctic char or you can only fish with a rod and reel. But you do know, unless you have been living in a cave since the 1800s, that fishing is highly regulated and whatever the rules are, there are rules. So you need to find out what the rules are and then follow them.
Similarly, if you want to run a restaurant you may not know exactly what the regulations require in terms of making sure the food is prepared safely (say what is the minimum grill temperature or the maximum freezer temperature) but you do know there are regulations. It's not immoral to have your freezer set at minus five instead of minus twelve – but it may be illegal and so you need to find out what the law says.
Realizing there are regulations and requirements your task is to find out what the regulations and requirements are and to follow them.
Almost always the rules are made for good reason. Overfishing leads to rivers without fish. A freezer that isn't cold enough may allow food poisoning. An inappropriate tax deduction makes everyone else pay more than their fair share. The rules are sometimes a pain to follow but they allow society to function.
As a practical matter, if you have made a genuine effort to find out what you ought to do and you try to do it, it is most unlikely you will be prosecuted for a technical breach.
That said, if you want to do something in a regulated area the duty to make sure you are following the law rests with you.
Of the Law Societies of Upper Canada and Nunavut