No, there is no evidence for this claim
The claim in the original post is no longer present in the newer article on CNN. This is not sufficient to conclude that the Iran has not taken credit in the past, but it is sufficient to conclude we no longer have reason to believe that they have taken credit, without which the only logical thing to do is to assume they have not.
Withdrawing a statement is not a retraction. It says something of the original source (CNN) that they don't have the integrity to do so. It's quite a serious allegation they've made in the earlier version.
You can see another source repeating this claim on Business Insider, "Suspected 'kamikaze drone' attack on an Israeli-linked tanker that killed 2 was retaliation for Israel's bombing of Syria, says Iranian TV",
On Friday, Iranian government Arabic-language television network Al Alam TV said the attack was in "response to a recent Israeli attack on Al-Dabaa airport in the Al-Qusayr region in Syria," which it attributed to "well-informed sources" in the region.
While Al Alam is associated with Iran, we have no idea who made the claim. (It's made more difficult to substantiate this information when the United States is censoring Al Alam and their new site isn't yet up.)
Furhter we can find an official denial from the Iranian Foreign Ministry Spokesman Saeed Khatibzadeh of the attack made on Al Alam,
Khatibzadeh denied in his weekly press conference today, Sunday, the accusations against Iran, and stressed that they were unfounded, and said that the presence of the Israeli entity in any region causes war and chaos in it. Khatibzadeh said, "This is not the first time that the Zionist entity has leveled accusations against Iran, and this entity, wherever it went, took with it chaos, instability, terrorism and terror." Khatibzadeh stressed that the responsibility lies with those who opened the door to the Zionist entity in the region, and denounced the false accusations leveled at Iran.
You can see this denial repeated again on August 1, 2021 on Iran's Press TV. So it seems currently Iran is certainly not taking credit for this attack.