The better way to do it is to forget about a lookup service and make the AS number a part of the IP address. This is why you do want 128-bit addresses. You could make the AS the first 32 bits of the address and then each AS would have four billion /64 networks.
But in practice this is basically what you get with IPv6 anyway. The problem with IPv4 is that because there aren't enough addresses, you have people wanting to add dozens of network prefixes to the same AS because they couldn't get a single contiguous block large enough for their needs. With IPv6 you can give every AS a /32 with 96 bits worth of addresses in it and they'd never need another one.