Almost a decade after Canada’s housing market escaped the real-estate meltdown experienced in many parts of the U.S., the risk of a potential housing bubble in Vancouver and in Toronto has become a central preoccupation for policy makers. Some economists say that with no end in sight to ultralow interest rates in Canada due to the impact of sagging commodities prices on the country’s resource-dependent economy, the risk is only growing.

In Toronto and especially Vancouver, which has joined the ranks of the world’s most expensive cities, the debate over how to handle soaring home prices has come to center on the role of foreign buyers.

Mántengase al día con el boletín de Mansion Global

Suscríbase

Foreign real-estate investment that is speculative, in addition to helping to push up prices, can pose an additional risk because it may be more mobile and subject to capital flight, leading to increased volatility, Canada’s national housing agency has said. But scant data exist on what role foreign buyers are playing, because no such information is collected by authorities.

The benchmark price of a detached Vancouver house more than doubled between 2005 and 2015 to 1,248,600 Canadian dollars (US$857,538), according to the Real Estate Board of Greater Vancouver. Based on a housing-price index of the Canadian Real Estate Association, home prices in Vancouver, which include condos, apartments and houses, rose by nearly 19% to C$760,900 in December from a year earlier.

While homeowners may rejoice, soaring prices and a limited rental supply are making it difficult for Vancouver residents to remain in the city, according to Mayor Gregor Robertson.

Mr. Robertson has been in contact about this issue with his counterparts in New York, Paris, Hong Kong, London and San Francisco, he said in a recent interview. “The amount of capital flowing into urban real estate in highly desirable cities is enormous. It’s taking us some time to assess it and try different strategies.”

“At this point we’re among a small number of cities that are seeing unprecedented increases in the value of our housing,” Mr. Robertson said. “We need strategies to address that so people who grow up and go to school here have a chance to stay and build a career in their hometown.”

The government of British Columbia is expected to bring in measures aimed at addressing the issue of housing costs in its February budget.

Not everyone believes foreign investors are having an impact on the overall housing market, or that it is a bad thing if they are.

The B.C. Real Estate Association issued a report in June 2015 saying that upward pressure on prices for detached houses is largely driven by land scarcity and densification policies—rather than foreign investment. “There are data and analyses from a number of sources that point to foreign investment as insufficient to impact a market as large and diverse as Metro Vancouver, save for a small segment of luxury homes,” the report said.

The association suggested the provincial government should find a way to monitor the flow of investment into housing to understand the issue better but said it didn’t see a need for policy makers to attempt to limit foreign investment at the time the report was published.

The lack of data led Mr. Yan, of Bing Thom Architects and also Simon Fraser University, to look in garbage cans and measure hydro use for evidence that newly bought homes were sitting empty, a possible sign of ownership by buyers who don’t live in the city.

Mr. Yan’s research recently attracted the attention of the national housing agency. Canada Mortgage and Housing Corp. President Evan Siddall, acknowledging the data gap on foreign buyers in a speech last fall, cited Mr. Yan as helping to piece together “a story” that suggests foreign buyers may account for a “substantial portion” of demand for luxury single-family homes in Toronto and Vancouver.

In one study, Mr. Yan obtained land titles for a six-month period for three of Vancouver’s most expensive neighborhoods. Among his findings: More than half of the 172 homes purchased during that time were bought by people with non-Anglicized Chinese names, which he says indicates that they were more likely to be recent immigrants to Canada.

Mr. Siddall said his agency is preparing to collect more data.

Mr. Robertson has proposed a luxury home tax and a tax on speculation, which he said could be applied in cases where homes are bought and sold quickly. He also has suggested that investment properties that have been left vacant be taxed above the residential rate to encourage their owners to rent them out to tenants.

Under pressure to address surging home prices in Sydney and Melbourne, Australia’s government tightened restrictions on temporary residents who want to purchase new dwellings. Foreigners looking to buy existing homes now must seek approval from the country’s foreign-investment regulator and are expected to sell once their temporary visas expire.

New Zealand recently introduced new measures to track and limit foreign real-estate investment: Beginning in October, nonresident buyers were required to have a New Zealand bank account and tax number to acquire property. Research by an analyst for the opposition Labour Party earlier this year suggested a large number of homes were being purchased by people with Chinese surnames.

The U.S. National Association of Realtors says residential property sales to foreigners reached $104 billion between April 2014 and March 2015, up from $92 billion in the previous 12-month period.

Canadian authorities, worried about possible overheating in Toronto and Vancouver, tightened mortgage rules in December, requiring a higher down payment for more expensive homes. The country’s top bank regulator also moved to require banks to hold more capital to protect against residential-mortgage risk.

But measures aimed more directly at foreign buyers pose a greater dilemma. The government of British Columbia has signaled it has no plans to take the steps Australia has.

However, housing costs are “very much a topic of debate, discussion, within government right now,” British Columbia Finance Minister Mike de Jong told reporters late last year, according to a transcript provided by his office.

—Alyssa Abkowitz contributed to this article.

Write to Kim Mackrael at kim.mackrael@wsj.com and Jason Chow at jason.chow@wsj.com