I think you shouldn’t do it without talking to your doctor. I am on a maintenance chemotherapy drug daily but am receiving all the vaccines in a very controlled manner since I had a stem cell transplant. I did get the flu shot and also pneumonia vaccines which made me feel much safer going into winter.
I had breast cancer in late 2017 and asked my oncologist about the flu shot. She advised me to get it, but asked me to schedule it in the middle of my chemo. I did, and had no side effects from either chemo or the flu shot. Talk to your oncologist about timing.