BANGKOK—At least seven people were killed and 19 others injured when workers at a scrapyard in Bangkok tried to pierce the case of a suspected World War II bomb, authorities said.

The bomb had been recovered at a construction site by builders, who later sold what they thought to be a bore pile to the scrap warehouse in a suburban community in Bang Khen district, north of Bangkok, according to police and witnesses.

Workers...