However, the input of AB opamp could be rail to rail, which violates the presumption for the small signal.
No.
Small signal analysis doesn't require linearity, only a continuous transfer function. The small-signal gain is generally different for each operation point, that's neither specific for class AB output stages nor rail-to-rail op. Of course, you can expect larger changes near the rails. Cause too many parameters are involved (supply, voltage, load impedance) you most likely won't find exact specifications in datasheets. But most OPs have a distortion specification for a typical configuration, that allows to estimate the closed loop behaviour.