An ultrasonic sensor according to the invention comprises at least one ultrasonic transducer, at least one resistor connected to the ultrasonic transducer and a housing accommodating the ultrasonic transducer and the resistor. The ultrasonic sensor is configured in such a way, that it is not or only slightly ferromagnetic, so that the ultrasonic sensor acts neutrally with respect to an external magnetic field (for example in an MRT).