President Trump is mulling a plan to punish a major ally of the US after the country's leaders criticised the Iran war.