Brazil holds the world’s second-largest reserves and wants to become a processor of critical minerals—but it refuses to choose sides between Washington and Beijing.