Yes, it is possible that both ports respond to AT commands. This mode is default when a port is opened with at+wmfm.
However, if you do AT+ipr=9600 on port 1, this will not have an effect on port 2. You will need to send the at+ipr command from the port you would like to configure! It might be that port 2 operates on an other speed and because of that does not respond to the command…
If this does not help:
which OS are you using?
are you sure the data sent gets to the modem on the correct pins?
there is none that I know of, unless you implement an OpenAT application. An application can set configuration for all ports (so you can implement a command that sets the baud rate for com2 when called from com1).