Lyra2 sponge construction and random numbers?
From what I can tell, you've found the salt input to modern password hashing schemes which indeed accepts random numbers to hash the same password to different results on distinct invokations.

Now the idea of the salt is indeed to prevent the dictionary attacks you envisioned (if you keep the salt secret, in which case it becomes pepper) or at least force you to go throgh your entire dictionary for every single salt you encounter, which will take time and slow you down in breaking large databases of passwords. However, normally, all parameters for password hashes are specified (including the salt) and as such it is an entirely deterministic computation from the password and the stored parameters to verify the stored password hash.

Finally, yes: It's impossible to directly recover the password (or a valid password) from its hash as then the function would have failed its most important role which is to make it hard to recover the password.