The j-3 cub I fly does not have a rotating beacon. It does not
have anything electric. Neither did the Pitts I used to fly.
Pilots are allowed to change light bulbs. The bulb in the common whelen rotating beacon is a standard ( but uncommon) bayonet bulb that you can buy from auto parts shops. Are you sure it's not just the bulb?
The lights actually get pretty dusty and dirty up there may be benefit from simply cleaning it. The common ones are a simply a 12v bulb with a reflector that rotates around it driven by a motor in the base of the light.