To track the role of foreign investment in Vancouver’s housing market, urban planner Andy Yan scrutinized land-title documents, measured condominium owners’ electricity use and even peered into trash cans outside newly purchased luxury houses.

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...