Thanks for the inputs folks.
For the return flight, I'm planning to get a separate tickets from A->B and B->Canada. And the passport switcheroo will be done in B. So, I should be OK there.
What worries me is the departure. And yup, the airline to country A will not be Air Canada. AC is only going to fly me to Vancouver, and then their Asian partner (ANA, Eva Air, etc.) will take me to country A. Usually the check-in for all boarding passes (including the flight to Country A) will be conducted by Air Canada in Canada. So it's possible for AC to forward my API info (with Canadian passport) to the Asian airlines as well.
I guess the safest bet for me is to use country B as a proxy for departure as well.