First of all, a computer doesn't have a single IP. It may have many. Second, as demonstrated by this thread, a computer can have one or more IP addresses without having a hostname. There's no good reason to expect or require a computer to have a hostname in order to use aMule.
Lastly, of the various methods for discovering (one of) the computer's IP address(es), looking up the hostname is a pretty poor choice. Usually, the only recommended one is to look up the local socket address from a connection with another computer. That gives you the IP address most appropriate for that peer. Unfortunately, that gets all screwed up by NAT.
And that brings us to this fact: the only reliable way to tell somebody your IP address is not to. It is never necessary to transmit your IP address over an IP protocol. It's redundant. All such communication already carries your IP address, and it's much more reliable than any mechanism we can use to try to figure out our own. The peer should just get our IP address from the socket on which they received our message(s).