"Is this method legal for retail investors?"
Absolutely. It is a standard journaling process used by investors to move assets between currency-denominated accounts. Banks don't advertise it because it eliminates their 2-3% conversion fee, but as long as you have a brokerage account that supports both CAD and USD, you are fully within your rights to use it.