It’s varied a lot by version of the software, and by iterations of the mouse models with such functionality. I recall at least one Logitech mouse where the buttons couldn’t ever be reprogrammed; at least one other where it was unsupported before a SteerMouse update; and others where they were supported like any other mouse button on arrival.
Edit to add that IME most have fallen into the last category for a several years now.