BEIRUT—A misdirected airstrike by the U.S.-led coalition earlier this week killed 18 allied fighters battling the Islamic State group in …