Afghanistan’s ruling Taliban on Sunday announced a ban on harvesting poppies, even as farmers in some parts of the country began extracting the opium from the plant that is needed for making heroin.