I can publish one hex private package with the same name of a public hex package or return something error?
Yes. Its allowed because private packages are stored in a separate repository from the public one.
6 Likes