Public carriers like airlines are not allowed to refuse service for the reason of refusing to show ID.
They can refuse for other reasons, but the are not “in the loop” when passengers currently get screened by the TSA, which is where RealID is “required”.
Outside of ERs in exigent circumstances, any commercial enterprise in the U.S. retains the right to "refuse service" though the nuances of enumerated reasons backed by jurisprudence differ by industry and locale.
An airline can not refuse the "service purchase" unless the customer has been "banned" (technically a trespass statute), but they can refuse to "execute service" for a whole host of reasons including unforeseeable "Acts of God", logistics, or simply if the customer is intoxicated.
You're correct that any sort of federal no-fly list is not lawful and, so far, there isn't enough court precedence to make a general policy and the ACLU has won some (limited) court victories. IMO, it is unconstitutional.
In practice, a "banned" passenger is trespassed off of airline property (the plane or gate) and that prior trespass is noted in their customer registry. If the "banned" passenger attempts to fly with the airline again, they are advised verbally or with text that they will not be able to board the plane, but they can still book a ticket. The passenger is then "trespassed" (again) at the gate and not allowed to board.
The airlines don't even check ID most of the time with these electronic boarding passes if your not checking luggage.
They do check your ID for international flights