The measure comes as the country grapples with some of the worst housing affordability issues in the world.
Prices have jumped more than 20%, pushing the average home in Canada to nearly C$817,000 ($650,000; £495,000) - more than nine times household income.
But industry analysts say it's not clear a ban on foreign buyers will address the problem.
Data on purchases by foreign buyers in Canada is limited, but research suggests they amount for a small fraction of the market.
"I don't think it's going to have a huge impact," said Ben Myers, president of advisory firm Bullpenn Research & Consulting in Toronto, who found foreigners accounted for just 1% of purchases in 2020, down from 9% in 2015 and 2016.
"It's a fairly low number and let's face it, the people that really want to buy ... are going to find alternative ways to do it."
Mr Myers said the soaring housing costs reflect strong population growth and a shortage of supply, due in part to rules that restrict development.
The issues have worsened since the pandemic hit in 2020, when policymakers in Canada and elsewhere slashed interest rates to stabilise the economy, lowering borrowing costs and boosting demand even further.
The moves have fuelled the soaring housing prices seen in many markets around the world, but in Canada the disconnect between home prices and incomes is one of the most dramatic, according to OECD data.
Mr Trudeau pledged to tackle housing affordability during his campaign for election last year.
In addition to the temporary ban on foreign buyers, the budget proposal his government unveiled on Thursday sets aside billions to spur new construction and proposes new programmes, such as a tax-free savings account for first-time buyers.
Mr Trudeau has also discussed banning certain bidding processes that favour investors, who by some measures have accounted for about one in five homes purchased in Canada since 2014.
The proposed ban on foreign buyers would exempt permanent residents and foreign students and workers, as well as those buying their primary residence.
The proposal builds on actions such as special taxes that some parts of Canada have already taken against out-of-town and foreign buyers.
In Ontario, for example, provincial Premier Doug Ford recently announced plans to raise an existing tax on foreign buyers from 15% to 20% and expand it beyond Toronto to the entire province.
While foreign purchases are not the driver of the affordability issues, taxing them at least captures revenue that can be re-deployed to address such problems, said Steve Pomeroy, head of Focus Consulting, a housing policy firm.
"If you ban them, you don't really have much of an impact on suppressing rising home prices and you give up the revenue," he said.
New Zealand introduced a similar measure banning foreign buyers in 2018.
"It's good politics because it's easy to blame a victim that nobody cares about," Mr Pomeroy added. "I don't think it will have much of an impact."
Paul Kershaw, professor at the University of British Columbia and founder of Generation Squeeze, also said he saw little in Mr Trudeau's proposal likely to slow price increases or significantly address affordability.
"It's not clear the housing measures will be sufficient to break Canada's addiction to high and rising home prices," he said, noting that for existing homeowners, the high prices help amass wealth.
Mr Pomeroy said he does expect price appreciation to slow in coming months, as the central bank raises interest rates. The Canadian housing market is particularly susceptible to such moves, since many buyers rely on five-year mortgages rather than the long-term ones common in the US and UK.
But higher interest rates will only make it less affordable for prospective buyers trying to break into the market, he warned.
Mr Myers said over the long-term, he expects hot markets such as Toronto and Vancouver to become dominated by renters, as regular buyers get priced out of the market, unless politicians address supply.
But Mr Pomeroy said high development costs means that adding supply will not necessarily reduce prices, unless the additions are dramatic.
"Unless you've got born into the right family ... the prospects for young buyers are quite dim," he said.