Type-B anomaly matching and the 6D (2,0) theory