As @looper says, alchemy did exist before the Dwarf in the Flask was created. In fact, the man who created the Dwarf would later become Van Hohenheim's teacher. I don't believe much of alchemy was ever used in Xerxes in general, but the king was a big supporter of it, enough that he would later bet his own life on it and ask for immortality.
It's also hinted that alchemy was what created aspects of the universe. In the last few episodes of the series,
Father absorbs the entity known as "God" (the Eye of God behind the gate) and gains the ability to simply create a sun in the palm of his hand, at a whim.
It is suggested that this very same power was once used, by either Truth or God, to create the stars and planets in the universe. That would mean that alchemy has always existed, but was just brought to light by the Xerxians, and the word was spread by Father and Hohenheim during their travels.