Exactly, Judy. Most hip operations require some period of restricted movement such as you describe but it is, of course, down to the surgeon to dictate. Having seen so many patients with disclocations within the first 2-3 weeks, I wouldn't care to test it.
It might be of interest to you that the highest risk group is in the elderly who have a hemi(half)arthroplasty after a fractured neck of femur or hip. But they frequently start off with poor quality muscles anyway.