Hospitals and public-health officials in the U.S. and Europe are rationing medical masks and scrounging for more, as they prepare for a potential widening of the coronavirus epidemic.

Global hoarding has left European wholesalers with empty shelves. Manufacturers outside China say they won’t be able to fill an exploding stack of orders for months. U.S. hospitals and medical-supply companies have reported dwindling mask inventory and partial or delayed shipments as the surge in global demand for protective equipment enters...