@ErictheCerise In this scenario, the US is massing troops and equipment on the border with clear indication for an invasion.
I don't know if there's a way out on US public opinion by that point. Ideally the foray is enough to take and hold some territory, so that American military might is focused on that point, not invasion.
As for allies, I agree that it's a major question. Canada would probably need to clear with NATO that preemptive strikes count as self-defence.
@ErictheCerise Because 2/3 of Canadian population and infrastructure is within 1 hour's drive of the US border, we really can't feasibly wait for the invader to put a toe over the line before defending ourselves. By the time they cross the border, it's too late.