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.
It therefore seems you will need a regular Schengen visa, and not merely an airport transit visa, as you would leave the international area of the airport. Because of that, neither the fact that citizens of Iran require an airport transit visa 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 this 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 for transit purposes 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 Schengen 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.).