As an Iranian I can tell you that breast-feeding in public is NOT a crime (at least in Iran) and you don't need to expect any severe consequences for this ;) Mothers do feed their children here whenever/wherever needed and it's none of anybody's business to question them why they are feeding their children. It's however usually a good practice for breasts to be revealed as least as possible while feeding the baby. You are a foreigner and would be of more attraction to people here as foreigners usually are.
Have a nice trip :)