If he’s not impeached though, can he still be prosecuted for treason later on after he leaves office?
Yes, prosecution for treason applies to all the people, not just those in office. It’s specifically defined in the Constitution and requires two witnesses to the same act.
The Congress (House & Senate) can only impeach and convict a sitting president. The Constitution prohibits Congress from passing a Bill of Attainder which would amount to trial and conviction of a private citizen. That’s the role of the courts.