You may fly without ADSB under the Class B or Class C shelf provided you remain outside of any Mode C veil. §91.225 tells you where you cannot fly. It says you cannot fly within the lateral boundaries of the Class B or C airspace or above the airspace.