I don't know about Rome specifically but many European airports are split in two areas, one for Schengen/internal flights and one for international flights. Even when the terminal or even the (physical) gates are the same, the flows are kept separate and passengers coming from a Schengen flight can exit the airport without passport control. In some airports, the same physical gates have two numbers, one for Schengen and one for non-Schengen flights but it really is the same gate and it can be connected to different corridors as needed. Flying from the same terminal therefore offers no guarantee that both flights depart from the international area of the airport or that you don't have to go through a border-crossing point.
For this reason, it's difficult to see how you could transfer to a Rome-Milan flight without the right to enter the Schengen area as it would either imply that all passengers need to be checked in Milan or that you have effectively entered the Schengen area and could therefore leave the airport and stay illegally, thus defeating the whole system.
I would therefore suspect that you could need a regular Schengen transit visa (type B), and not merely an airport transit visa (type A), as you would leave the international area of the airport. If that's the case, neither the fact that Iran is an annex IV country nor the exemption for green card holders would be relevant and the rules governing entry in the Schengen area would apply, which means that, as an Iranian national, you would need a visa in any event.
I would definitely check all that with the airline, airport and Italian consulate as soon as possible.
PS: My initial answer was somewhat imprecise as there is a distinction between a short-stay visa, a transit visa and an airport transit visa. Briefly, being a US resident exempts you from the airport transit visa requirement to which other Iranian citizens are subjected but not from a regular transit visa when needed (e.g. if you need to enter the Schengen area of the airport, stay in a hotel for the night, travel by train, etc.).