It also depends on how long until your surgery. If you have a month or more, some exercise can help as long as it doesn't hurt you. Less than a month and you probably wouldn't lose enough to matter one way or the other. But, what you don't want to do is to exercise to the point that you inflame your hip. Going into surgery with an angry hip is not good. As long as you avoid that, losing some weight is always a good thing.