I think what you are calling a rim bearing is actually a wheel hub. It is the thing that connects to the axle and you bolt the tyre onto it. They usually connect to the axle using a key and keyway, as well as set screws sometimes. You should be able to take the old one off and then get a new hub and make it work