The Canadian prime minister said many of his country’s former strengths, based on close ties to the US, have now become vulnerabilities.