I can certainly relate to the "pain" you are experiencing. I have had both right and left hip replacement surgeries.
My first surgery, for my right hip, was in 2004. This was before I started dance lessons. I was in my late 50's, so recovery was quick without any problems.
My second surgery, for my left hip was last April, 2013. The pain was so bad that I had to cancel a competition in January, 2013. This surgery occurred after 6 years of dancing. I am now in my late 60's and recovery has been slower than the first surgery. I am still experiencing some pain which I attribute to my dancing. My leg muscles are very well developed, the best in my life, and rock hard. The surgeon had to really use a lot of pressure on the leg to pop the hip out of joint, leaving me with a lot of bruises and displaced muscles, a lot more than my first surgery.
In October, 2013, I danced in my first competition after surgery. I did pretty good and I had no problems with my hip, only the muscles in my leg. Two weeks ago, I danced in my second competition, no problems with hips, and placed high in all my heats.
I encourage you to have the surgery. After it's over, you will say, like all of us, "I wish I had done this sooner!" Make sure you do a lot of walking after surgery to get your "dancing legs" ready. I worked my way up from 10 foot walks, to 1/4 mile walks, twice a day, within two weeks of surgery. I was back to work after 2-1/2 weeks, and driving a car after 4 weeks. I was back on the dance floor after 6 weeks. My instructor had to only slightly modify my open routines to accomodate the new hip. I can do over 95% of the figures I was doing before surgery.
But realize that you will probably have a YEAR of recovery time. It takes that long for all the muscles to sort themselves out and heal completely. I am now working with a personal trainer to work out a leg muscle that still doesn't want to cooperate.
So, to answer you original questions... Yes, you can have hip replacement surgery and return to ballroom dancing and even competitive ballroom dancing.