There are two types of flu vaccine - inactivated influenza vaccine (which uses 'killed' influenza virus) and live-attenuated vaccine (which uses a more mild virus that should be asymptomatic).
According to the CDC, among the contraindications for the live-attenuated vaccine is: "Children aged <2 years or adults aged ≥50 years". This is likely because, as you mentioned, it's possible for you to shed said live virus and infect others, and while the attenuated flu strain should be harmless, it's not a great idea to test that on high risk groups.
The inactivated vaccine carries no such contraindication. It is however something you should certainly bring up with your medical professional.