The rank of ensign for bearing flags comes from Europe, in particular Britain, but even in that army the rank was also the same as a Third Lieutenant. The British Army also had the rank of color sergeant for the same role at times. But what is confusing, at least before 1864 in the Confederate Army, was the use of the rank of ensign prior to that time. For example, all of the Georgia Militia regiments had an ensign in them in 1861. But they were not color bearers at all but, rather, considered Third Lieutenants. I have seen the ensign rank in CS regiments prior to 1864 and these officers had nothing to do with carrying flags but did subaltern rank duties.
So be careful when you are dealing with the rank prior to 1864.