Did they include the states which had left the Union? If the Union had allowed the other states to leave, would they had reverted to a previous flag design?
Did they include the states which had left the Union?
The practice of adding stars to the flag continued during the Civil War. They absolutely did still include the Confederate states.
This is the flag that flew at Ft Sumter. It had 33 stars representing all the states prior to Kansas. It should be noted that the exact pattern of stars wasn't defined by statute, so designs varied. It was common for forts to have stars arranged in a diamond pattern. So this pattern wasn't unique to Sumter.
In July of 1861, a star was added for Kansas and for the next two years flags had 34 stars on them. This style rectangular pattern was the most popular. But circle, star, cross, and other patterns continued to be popular. Several of these were regional or commercial designs and marketed as such. The star pattern above for example was called the "Great Flower" or the "Candy Stripe" because of how they introduced that odd stripe down the left side.
In 1863 an additional star was added for West Virginia. I'm not aware of as many variant designs during this period. 35 makes five rows of seven stars very popular. But apparently at least New Jersey continued to equip their regiments with flags of concentric circles.
In 1865 Oregon was added to the Union, and a 36th star was added to the flag. This again continued to have a variety of designs. For example Lincolns coffin was draped with This "Great Star" design. Unique one offs also continued to be made. I'm particularly fond of this shield flag. It was made for the 23rd Corps out of captured Confederate flags during Sherman's march across Georgia. The fact that the flag was literally stitching the rebel stars back into Union, was very symbolic of what they were attempting to do in the war.
The vast majority of battles would have been fought under 34 or 35 star flags. There are plenty of examples of flags though that continued to be flown with less than the "proper" number of stars. For example when Sumter was recaptured in 1865, the original garrison 33 star flag was re-flown. Getting new flags to units also wasn't necessarily a priority when new states were added. Likewise some units held on to beloved flags that had seen previous battles. So it wouldn't be unusual for a battle to contain flags of various star counts and patterns.
Ultimately maintaining the star count in Union flags was a symbolic act. The official Union point of view was that the Confederate states didn't have a right to secede and never legally left the Union. So maintaining full proper star counts mattered a lot. No one seemed to care if a regiment was still carrying a 33-star flag from 1861. But they absolutely would have cared If someone was carrying a 20, 21, or 23 star flag that was missing the southern states.
If the Union had allowed the other states to leave, would they had reverted to a previous flag design?
That's an interesting but ultimately speculative question. I've never heard of any speculation regarding how flags were supposed to change. Interestingly there were individuals that favored letting the Confederates go. But they still flew 34 star flags. This post from a couple of years ago is about just such a "copperhead" flag. They were willing to put a slogan on the flag. But they still put on the proper number of stars. What might have happened to the flag if states had actually left the Union is unknown.
QuickSpore's answer might be considered slightly misleading. He is a little bit imprecise in the terminology of vexillogy, the study of flags. Warning! The following will be very precise about the terminology of United States military vexillogy.
We may ask when is a flag not a flag? When a flag is a special type of flag that has a special technical name.
Thus it has always been very rare for United States troops to carry United States flags into battle with any official sanction to do so. The US army has always had US flags on flagpoles in forts, posts, camps, and garrisons. Flags that are run up the flagpole in the morning and lowered at night.
But despite what many movies show, it was never regulation for US soldiers to carry US flags attached to staffs or lances in battle. The flags carried on portable lances by military units on parade or campaign, and in battle, are special types of flags called colors, standards, and guidons.
The Revised United States Army Regulations of 1861: with an appendix containing the changes and laws affecting army regulations and articles of war to June 25, 1863, Article L, Flags, Colors, Standards, Guidons, page 461, describes the various types of military flags.
1464 "The Garrison flag is the national flag. It is made of bunting, 36 feet fly and 20 feet hoist, in thirteen horizontal stripes of equal breadth, alternately red and white, beginning with the red. In the upper quarter, next the staff, is the Union, composed of a number of white stars, equal to the number of states, on a blue field, one-third the length of the flag, extending to the lower edge of the fourth red stripe from the top. The storm flag is twenty feet by ten feet; the recruiting flag nine feet nine inches by four feet four inches."
The storm flag was a flag to be flown in rough weather. The above are the only objects described as flags in the 1861 army regulations. All other flags are described with technical military terminology. The garrison flag has proportions of 1 by 1.8, the storm flag 1 x 2, and the recruiting flag 1 by 2.25.
1465 "Each regiment of Artillery shall have two silken colors. The first, or the national color, of stars and stripes, as described for the garrison flag. The number and name of the regiment to be embroidered with gold on the centre stripe. The second, or regimental color, to be yellow, of the same dimensions as the first, bearing in the centre two cannon crossing, with the letters U.S. above, and the number of the regiment below; fringe yellow. Each color to be six feet six inches fly, and six feet deep on the pike. The pike, including the spear and ferrule, to be nine feet ten inches in length. Cords and tassels, red and yellow silk intermixed."
1466 "Each regiment of Infantry shall have two silken colors. The first, or the national color, of stars and stripes, as described for the garrison flag. The number and name of the regiment to be embroidered with silver on the centre stripe. The second, or regimental color, to be blue, with the arms of the United States embroidered in silk on the centre. The name of the regiment in a scroll, underneath the eagle. The size of each color to be six feet six inches fly, and six feet deep on the pike. The pike, including the spear and ferrule, to be nine feet ten inches in length. The fringe, yellow; cords and tassels, blue and white silk intermixed."
Thus the colors have proportions of 1 by 1.0833, much shorter proportions than any national flag of the US, and are entirely separate types of flags.
Almost all of the Union forces in the Civil War were volunteer units and thus served for only the four years of the Civil War, sometimes less. A regiment might have its colors captured or badly damaged and replaced one or more times during the Civil War, or it might carry the same colors from 1861 to 1865 and thus have colors with fewer stars than new colors would have.
All national colors made April to July 3, 1861 had 33 stars, all national colors made July 4, 1961 to July 3, 1863 had 34 stars, and all national colors made from July 4, 1863 to July 3, 1865 had 35 stars. Or should have had those numbers. It would be reasonable to expect to see national colors with 33, 34, or 35 stars in 1863 to 1865, but it would have been shocking to see a color with 32 stars or less, because the United States never took away stars representing the rebel states, and the volunteer regiments and their national colors were too new to have fewer than 33 stars.
1467 "the camp colors are of bunting, eighteen inches square; white for infantry, and red for artillery, with the number of the regiment on them. The pole eight feet long."
Camp colors were used to mark the position for a regiment to make camp.
Mounted units had different types of flags:
1468 "Each regiment will have a silken standard, and each company a silken guidon. The standard to bear the arms of the United States, embroidered in silk, on a blue ground, with the number and name of the regiment, on a scroll underneath the eagle. The flag of the standard to be two feet five inches wide, and two feet three inches on the lance, and to be edged with yellow silk fringe."
1469 "The flag of the guidon is swallow tailed, three feet five inches from the lance to the end of the swallow-tail; fifteen inches to the fork of the swallow-tail, and two feet three inches on the lance. To be half red and half white, dividing at the fork, the red above. On the red, the letters U.S. in white; and on the white, the letter of the company in red. The lance of the standards and guidons to be be nine feet long, including spear and ferrule."
In 1862 a revised regulation decreed that the patterns of camp colors and guidons were to be the stars and stripes as in the national flag, but with the same proportions as camp colors and guidons had before.
As the war continued and regiments were assembled into brigades, brigades into divisions, divisions into corps, and corps into armies, flags were designed for brigades, divisions, corps, and armies.
So during the US Civil War United States military units did not carry national flags into battle, but regiments of artillery and infantry did carry national colors with the design of the stars and stripes on them, and companies of cavalry did carry swallow-tailed guidons with the design of the stars and stripes on them.
To some this may seem like nitpicking, but it is a fact that United States soldiers have never been authorized to carry objects in combat officially described in regulations as national flags. The regulations make a clear distinction between flags flown on flagstaffs on one hand, and colors, standards, and guidons carried into battle on the other hand. And national colors and guidons have too many design differences from national flags to ever look right if run up a flagpole.