Ideal ballooning stability in tokamak plasmas with rigid-body toroidal rotation