Middle Chinese *z- usually becomes Mandarin x- before palatals and s- elsewhere, but Middle Chinese 囚 *zu 'prisoner' became Mandarin qiu rather than *xiu. q- implies Middle Chinese *dz-. *dz-variants of *z-words also underlie Mandarin 詞辭 ci (instead of *xi).
Was the affrication of *z- a trait of a single Middle Chinese dialect? I don't think so, since the trait is not unique to one region and there is variation within branches (Mandarin, Wu, Min).
*dz- for 囚[tɕʰ]: Beijing, Jinan, Hankou, Yangzhou, Nanchang
but Xi'an and Chengdu have [ɕ] < *z-
[tsʰ]: Cantonese, Chaozhou, Fuzhou
[dʑ]: Wenzhou, Shuangfeng
*z- for 囚[ɕ]: Xi'an and Chengdu
[s]: Meixian, Xiamen
[z]: Suzhou (8.26.3:52: [z] could be from *dz-, since Suzhou has [z] but not [dz])
The patterns of distribution for initials descended from *dz- and *z- are similar for 詞辭 with the following exceptions:
Chengdu and Meixian have [tsʰ] < *dz-
Chaozhou and Fuzhou have [s] < *z-
Wenzhou has [z] < *z-
*z- and *dz- are phonetically similar, so it is likely that they were independently confused by speakers of more than one dialect.