This randomized phase I trial studies the side effects and best dose of Z-endoxifen hydrochloride in treating patients with stage 0-III breast cancer who are undergoing surgery. Z-endoxifen hydrochloride may treat or reduce the risk of breast cancer.