That matchup was confirmed Tuesday when Switzerland defeated Belarus 4-1 to finish first with 20 points atop Canada's pool.
Canada (5-1-1-0) ranked second with 18 points. Sweden (5-2, 15 points) had third locked up before beating Denmark 4-2 in its final preliminary-round game.
The top four countries in each group of eight advance to the quarter-finals with first playing fourth and second facing third.
The Czech Republic hammered Norway 7-0 to claim the group's fourth and final playoff berth Tuesday. The Czechas meet unbeaten Switzerland in Thursday's other quarter-final in Stockholm.
Finland finished atop the Helsinki pool after a 3-2 win over Latvia and will face Slovakia in the quarter-finals. Slovakia clinched fourth place in the group with a 4-1 win over the United States.
Russia and the Americans will meet in the other Helsinki quarter-final.
Also Tuesday, Germany edged France 3-2 in overtime.
The Canadians had a day off from the ice Tuesday after a 4-3 overtime win over Slovenia to conclude the round robin the previous night. Some players were already expecting the host country to be their next opponent in the tournament.
Canada defeated Sweden 3-0 last week, but that was before the arrival of forwards Henrik and Daniel Sedin and defenceman Alex Edler from the Vancouver Canucks.
"They've added some key players and they gave us a tight game already in front of their home fans," Canadian forward Steven Stamkos said. "It's going to be a hostile environment."
The quarter-final is a game Canada couldn't get past the last three years in this tournament. Canada last won a world title in 2007 and its last medal was a silver in 2009.
Defenceman P.K. Subban of the Montreal Canadiens was scheduled to arrive in Stockholm on Tuesday. The finalist for the Norris Trophy that goes to the NHL's top defenceman will skate with the Canadian team Wednesday and play Thursday.
"P.K. is going to come and help us that's for sure," Canadian assistant captain Stephane Robidas said.
"You can't rely on just one guy to do all the work or on one line or one set of defencemen. You need the whole group. You need everybody to pull together in the same direction. Everybody has to chip in in different ways. I think that's what we've had the last couple of games."Suggest a correction