Dual nature of magnetism in a uranium heavy-fermion system