Yes, but.
If you need to bend the hanger back to vertical, it will have been bent out of vertical already. So bending an alloy hanger (back) to 'about right' should be a temporary measure, while the rider finds and procures a replacement hanger. You can't see the grain boundaries and the microcracks inside the hanger exploited/created by the shear stresses of a 'bend': it has been weakened and straightening it will weaken it further (but the gears should work better). Try and do the 'bend back' in one move, not a series of little ones. Be firm and bold and have the wheel in the dropouts and the QR up tight (to minimise frame flexing confusing the bending extent). If it breaks in this boldness, better it breaks in your hands at 0mph.