For clarity: there is a difference between requirements to file a tax return versus requirements to pay an income tax (on this or that income).
Individuals can be required to file a return (resident or non-resident return) even if that individual is entitled to deductions or credits which have the net effect of no tax due.
Thus, for example, Canadian residents (with income) must file a Canadian tax return, regardless of where in the world that income comes from. Canadians who are not resident in Canada may or may not be required to file a non-resident tax return, usually dependent on whether they have a Canadian source of income.
Canadians who are not residents of Canada and who have no Canadian source income, generally do not have to file a Canadian tax return.
Canadians who are not residents of Canada but who have Canadian source income (over a threshold amount) are ordinarily required to file a non-resident Canadian tax return.
But that does not answer whether or not they owe taxes to Canada, or how much tax they are required to pay.
Indeed, similarly for a Canadian resident who must file a resident return, that does not necessarily dictate the payment of taxes to Canada.
This is where provisions protecting individuals from double taxation come into play.
Provisions which protect individuals from double taxation largely amount to giving credit or deductions reducing or eliminating a tax owed to one country based on payment of tax for that income in another country, so that an individual is not required to pay a double tax on income. The rules vary depending on which other country is involved. It can get quite complicated. A certified accountant is of course the better resource for getting answers to particular questions in this area, but in my experience many certified accountants are not well acquainted with this relative to even the most common scenarios, that is, relative to situations involving the U.S. or the U.K. So one may have to search for an accountant with the expertise in this area . . . or rely on a Canadian accountant and an accountant in the other country to coordinate with one another.
Just because a treaty and applicable law protects an individual from having to pay a tax to another country if the tax is paid in Canada, that does not necessarily mean no tax return has to be filed in the other country. And similarly, as to the converse, even if the tax is being paid in another country and the applicable treaty and law protects the Canadian from having to pay a tax to Canada, the Canadian may still be required to file a return.
Moreover, these laws protect against double taxation, but if the tax rate is higher in one country, some income tax may have to be paid to both countries. Payment of the lower tax rate in one country generally only protects the taxpayer from having to pay that amount again in the other, not from having to pay the higher amount. (Recognizing that the actual way the provisions apply depends, again, on what those provisions are and the countries involved).
Note that the date a return must be made does not usually determine which country has the primary entitlement to the tax. So it does not matter which return has to be filed first. Specific provisions, depending on where the taxpayer is resident, where the taxpayer engages in the activity resulting in income, and where the source of the income is, determine which country has the primary right to collect a tax on that income. The tax must be paid to the country with the primary right to collect it. Then the taxpayer is (in most common scenarios . . . again it varies from country to country) usually entitled to at least a credit against any tax claimed by the other country . . . thus, if the amount paid to the country with the primary right to collect the tax is as much or greater than the tax for that income is in the secondary country, no additional tax is due. If, however, the tax in the secondary country is greater than that paid to the primary country, the taxpayer gets a credit and only has to pay the secondary country the difference (the amount due over that already paid to the primary country).
That's a very rough, crude explanation of how it usually, generally works. How it works in particular varies and is subject to the specific treaty and laws for that country in relationship to Canada. For U.S. citizens, for example, just by being a bona fide resident of Canada, there is a flat deduction regardless of the source of income, and there is no need to get into the complexities of credits unless one's income exceeds that amount. There are, however, also specific rules applicable depending on where the work is actually done (many people live on one side of the U.S./Canada border and commute to a job on the other side), but overall credits are still available so that ultimately the maximum tax rate is paid (which can be some to one country and the difference to the other) but there is no double taxation.