What is the difference between AVCHD and ProRes in terms of quality?
You focus on quality in your question, so the answer is clear: ProRes (in various flavors) offers superior quality. There are other reasons you might choose AVCHD, but they don't relate to quality.

AVCHD is generally speaking a distribution format, while ProRes is more an acquisition and intermediate format (it uses all I-frames). ProRes also comes in a 4:2:2 /10 bit flavor, where AVCHD is 4:2:0 / 8 bit.