Did they allow the wine just for communion or did they use something else?
The National Prohibition Act [PDF] (1919), popularly called the Volstead Act, exempted sacramental wine:
Liquor for nonbeverage purposes and wine for sacramental purposes may be manufactured, purchased, sold, bartered, transported, imported, exported, delivered, furnished and possessed, but only as herein provided, and the commissioner may, upon application, issue permits therefor [...]
Nothing in this title shall be held to apply to the manufacture, wine for religious sale, transportation, importation, possession, or distribution of wine for sacramental purposes, or like religious rites, except section 6 (save as the same requires a permit to purchase) and section 10 hereof, and the provisions of this Act prescribing penalties for the violation of either of said sections . No person to whom a permit may be issued to manufacture, transport, import, or sell wines for sacramental purposes or like religious rites shall sell, barter, exchange, or furnish any such to any person not a rabbi, minister of the gospel, priest, or an officer duly authorized for the purpose by any church or congregation, nor to any such except upon an application duly subscribed by him, which application, authenticated as regulations may prescribe, shall be filed and preserved by the seller . The head of any conference or diocese or other ecclesiastical jurisdiction may designate any rabbi, minister, or priest to supervise the manufacture of wine to be used for the purposes and rites in this section mentioned, and the person so designated may, in the discretion of the commissioner, be granted a permit to supervise such manufacture.
Sacramental wine was one of a few "loop holes" in the Volstead act, along with prescription liquor and industrial alcohol; it also invited fraud, and in some places, religious debate. In Religion and Wine: A Cultural History of Wine Drinking in the United States, Robert Fuller notes several congregations of ardent Prohibitionists opted to make use of unfermented grape juice rather than wine, although they were not legally required to do so, and:
Although much of the activity inevitable spawned by this provision for "altar wines" eludes historical deocumentation, anecdotes abound of the formation of new religious sects with elaborate rituals requiring wine and of the inflation of membership statistics for a number of Jewish congregations in New York. (94)
Sacramental wine, however, was not enough of a market for most wineries and vineyards to survive Prohibition. Some bonded wineries still produced altar wines, but most were forced to switch up operations (to the production of tonics, wine bricks, non-alcoholic grape juice, etc.) or close.