No, the callback handler can be inside a class. But then the handler must have self as first additional argument. Example (ESP8266 one, but principle should work) with ISR fucntion sample.
class acquire:
def __init__(self):
self.adc_read = machine.ADC(0).read
self.data = array.array("L", [0] * _BUFFERSIZE)
self.index_put = 0
def sample(self, x):
self.data[self.index_put] = self.adc_read()
self.index_put = (self.index_put + 1) % _BUFFERSIZE
self.irq_busy = False