Rouhani said in response that he understood Japan's intention to contribute to navigational safety, the official told a media briefing after the two leaders met in Tokyo.
"I'm highly concerned about tensions running high in the Middle East," Abe told Rouhani at the start of the meeting.
Friction between Tehran and Washington has increased since last year when U.S. President Donald Trump pulled the United States out of Tehran's 2015 nuclear deal with six nations and re-imposed sanctions on the country, crippling its economy.
In May and June, several attacks took place on international merchant vessels, including Saudi tankers, in Gulf waters which the United States blamed on Iran. Tehran denies the accusations. In July, Iranian forces seized a British tanker in the Gulf after British marines captured an Iranian vessel in the Strait of Gibraltar. Both ships were later released.
The planned Japanese operation is set to cover high seas in the Gulf of Oman, the northern Arabian Sea and the Gulf of Aden, but not the Strait of Hormuz.
According to a draft plan approved by parties in the ruling coalition, Japan will deploy a destroyer and P-3C patrol aircraft for gathering information in the Gulf region - source of nearly 90 percent of Japan's crude oil imports.
If an emergency situation arises, a special order will be issued by the defense minister to allow the forces to use weapons to protect ships under attack, according to the draft plan.
Japan, a U.S. ally maintaining friendly ties with Iran, is looking to launch its own operation rather than joining a U.S.-led mission to protect shipping in the region.
Local media have said the plan will be approved by Abe's cabinet as soon as next week.
In the Tokyo meeting, Abe asked Rouhani to stick to commitments made in the landmark 2015 nuclear agreement and said Japan would do what it can to ensure stability in the Middle East.
In turn, Rouhani asked Abe to work with other countries to help keep the nuclear deal alive.
"I hope Japan and other countries in the world will work hard to help keep the nuclear agreement in place."
In response to re-imposed sanctions, Iran has gradually scaled back its commitments to the deal this year.