Is it possible to associate to a UUID information about the namespace it belongs,
Yes, see this document.
so to recover it later
Maybe. The problem is that two different namespaces may map to the same hash value. To avoid this, you should manually number your names (instead of hashing them). Then put the number into the octets 0-3. That gives you a deterministic mapping between UUIDs and names.