The former Afghan president said he had heard the "horrific sound" of a bombing that is alleged to have hit a hospital that treats drug addicts.