I don’t think there is a way to resolve a node name to an IP address from an iRule.
You could potentially create aliases without hardcoding a name to an IP:port combination. Something like:
serverA - “lowest” IP address in the pool
serverB - second “lowest” IP address in the pool
…
You can get a list of the active members of a pool using [active members -list] (Click here). You need to be running 9.4.2 or higher to use this command.