Yes. You can have both hips replaced at the same time. This is called a double hip replacement.
It's worth noting that with a double hip replacement, there's a higher risk of:
heart attack
stroke
blood clots
need for a blood transfusion
death