TORONTO—For years, some 1,600 nurses from Windsor, Ontario, have commuted daily across the border to work in Detroit’s health-care system, filling a nursing shortage in the Michigan city.

Now the nurses are at the center of a heated dispute between Canada and the U.S., as Canadian officials on Friday threatened to stop the essential health-care workers from crossing the Detroit River if the U.S. moves to prevent St. Paul, Minn.-based 3M Co. from exporting masks to Canada.

...