In at least one story of Sinbad the Sailor, drunkenness plays a part in the plot, so it seems to be more than an afterthought. Was this just Burton not knowing that Muslims are (in theory) forbidden to drink alcohol, or was there a time when this was not true?
Wine and drunkenness have their part in plenty of the original, medieval, Arabic 1001 Nights stories! Their contribution to plot and characterization is not always positive--although we don't stereotype 1001 Nights this way, many of the tales are moral lessons. But the text's characters absolutely move in a world with plenty of access to alcohol, people who drink it, and knowledge of the effects of drinking too much of it.
The stories in the Nights are tales out of time, of course, even when they center on what is named as the court of real person Harun al-Rashid, and they have their origins all over the place and are sometimes filtered through multiple cultural translations. There was a whole world of stories circulating around the Mediterranean and beyond--Chaucer's Canterbury Tales and the Nights both tell of the flying mechanical horse; episodes in Sinbad resemble rumors recorded by Marco Polo. Nevertheless, various characters' alcohol consumption does reflect actual practice among medieval Muslims.
"Alcohol is forbidden in Islam" is actually a matter of interpretation, although we don't typically think of it that way today. Is it a prohibition against alcohol, against wine, against a type of wine, against excessive wine consumption? There was no clear agreement. Jurists in 13th century Cairo grumbled about the amount of wine consumed during street parties. In 11th century Egypt, caliph al-Hakim eventually banned alcohol and public performance of music on religious grounds--only to have his sister Sitt al-Mulk swiftly re-legalize them after al-Hakim's "mysterious" "disappearance."
But by the later Middle Ages, Muslims' restrictions on wine-drinking and selling were already well known to western Christians who traveled through Islamic lands. Pilgrimage accounts of trips to Jerusalem often describe Muslims sneaking off to Greek Christians' homes to purchase wine. On one hand, it's a textual trope (and not a very flattering one); on the other, it was so common a trope that the idea itself, beyond the texts, was fairly common knowledge. (In perhaps my favorite passage in medieval travel literature, 15th century French/Burgundian author Bertrandon de la Broquiere goes on to describe himself losing a drinking contest to a group of Muslims.)
So wine might not have flowed in medieval Syria and Egypt the way it did in Burgundy, but its presence in Near Eastern society was accepted, even if not always approved.
I did a long answer on Islam-and-alcohol a long time ago: https://www.reddit.com/r/AskHistorians/comments/e96q9v/what_were_the_drinking_laws_in_iran_circa_10501100/fagy9t9/