Answer
See work.
Work Step by Step
The two forces mentioned in the question do not “cancel” because they act on different objects. If the net force on the wagon is nonzero, the wagon begins to move. The horse just needs to pull harder on the wagon than any oppositely-directed forces (e.g., friction) and the wagon will accelerate.