I don't want to make you unhappy, but I think I will...
That I know of, there are no SQL iRule commands like there are for HTTP. So this kind of manipulation seems to be impossible. LTM's role in this scenario would be only up to layer 4.
If the client does not support named SQL instances, the only way I see for this to work is to use default instances. From https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/database-engine-instances-sql-server?view=sql-server-ver16 :
« If a connection request specifies only the name of the computer, the connection is made to the default instance. A named instance is one where you specify an instance name when installing the instance. A connection request must specify both the computer name and instance name in order to connect to the instance. »
Maybe you'll have to work around this "feature". I really have no ideas, and it seems there were no other takers for your question 😢
/Mike