I'm approaching hip replacement. Along with bad knees, ankles & feet, plus my back, all due to arthritis & more, there are times I can barely walk.
BUT, I can usually ride my bike comfortably. So that I sometimes call the bike my "2-wheeled wheelchair".
There are numerous things that account for this. I never ride standing up on the pedals. With a 30-speed bike that allows me to select a cadence (usually around 60-65 rpm) that puts very little pressure on my legs or feet, maybe 25 pounds. Much less than walking, when my full body weight comes down on them, impacting against hard pavement.
My sitting saddle weight is directly on my pelvis, not through my hip joints. And because of the nature of my hip joint problem, I can tolerate the bicycle pumping motion, but not walking.
You may have something similar, as you seem to be describing. It's not impossible. The best way of knowing is consulting with an orthopedic surgeon who specializes in hip problems.