Technically most Anti-Radiation missiles could used against ships since all major surface combatants have radars systems. It's simply a matter of identifying those radar signals (using ELINT aircraft which Iran has at least 1 at the moment) and then programing the missile's seeker to home in on that signal(s).
And that is actually the Kh-58's only real flaw. Its seeker (at least the model Iran imported) was designed to defeat western SAM systems of the day, primarily the HAWK missile.The newer models can now engage much more advanced SAM/Radar systems. But i think its quite feasible Iran could improve the seeker to lock on to more modern radars used today especially if they expand their fleet of ELINT aircraft to collect the needed data.
Also the model Iran likely received only has a 160km range not 250km, that is the Kh-58U variant which was not exported outside the Soviet Union until 1991 as a downgraded model which is after Iran ordered their Su-24s. Regardless, it is still impressive range for a ARM and the U model in particular has a lock-on after launch ability the basic Kh-58 did not have.
So if Iran could build their own Kh-58 with at least the same technology as the Kh-58U they would have a very dangerous ARM on their hands and the basis for a dangerous anti-shipping missile to any naval vessel only armed with CIWS (mainly designed to defeat subsonic missiles).
Submarine launched is another task entirely. It would require a specially designed launch capsule as the Chinese have designed for their YJ-82 launched from their newer submarines. Not sure how complicated of a job it is be we havent seen any evidence they have this technology yet though againt I dont know how hard it is to develop, could be a simple task or a complicated one (likely the former personally).