Given the fact that I will always have a 128-bit integer as a key, and a maximum number of elements, is it possible to make a perfect hashing function?
If the entropy (expected value of information contained in the variable) of the key is bigger than what the result of hashing can accommodate - the answer is no.
If the entropy of the key is equal or lower than what the result of hashing can accommodate - the answer is yes.
What that means is that if your hashing function for example generates a 16-bit result (65536 possible values) and your 128 key variable can assume at most 65536 or fewer different values (so the entropy of the 128-bit key is at most 10-bits) than there exists such hashing function. On the other hand if your key can assume more than 65535 distinct values there is no way you can hash that into 65535 or less buckets.
Can someone recommend a hashing function that would do this?
Without knowing what possible values the key can assume no one can give you a hashing function that can do that even if you knew for a fact that the key entropy is so low that it could be done.