It's not required to transmit ADS-B in order to provide magnetic heading on Mode S. But most aircraft that have the capability to send magnetic heading are also ADS-B equipped. And the other way around, when an aircraft is ADS-B equipped it is no guarantee that it will be able to provide magnetic heading on Mode S. Typically aircraft do not transmit magnetic heading on ADS-B but send out a GPS based ground speed vector with respect to the true north.
Mode S Magnetic Heading is located in register 60, together with indicated airspeed, mach and vertical rate (baro & inertial). A Mode S radar can extract the information from the transponder by uplinking the appropriate Reply Request Code. It is not transmitted in every standard interrogation.