Yes taking iron pills can change your poop to a color green or even grayish black which is normal and nothing to be worried about.
In some people they may experience side effects when taking the iron pills such as stomach problems including heartburn, nausea, diarrhea, constipation, and cramps.
Internal bleeding is also another cause of green poop or other colors of poop changing so it would still be a good idea to let your doctor know that your poop changed from it's normal color to the green color.
It's best to be safe than sorry so letting the doctor know is recommended but it's usually normal for people to have green poop or grayish black colored poop when taking iron pills or iron supplements.