Yes, you can have surgery while you are on your period. After surgery there may be slightly more bleeding and more bruising; however, this definitely does not affect the result.
The situations that do require postponing surgery are a separate matter: in which situations is surgery postponed?