No, not using a single WP_Query. This would not be possible even if the relationship field was on locations instead of doctors.
Using a standard WP_Query you would need to first get ALL doctors and loop through the posts and collect a list of all of the locations from them and then do another query to get the locations.
Even using standard WP custom fields this would be difficult due to what it is you’re looking to get.
There might be some ways to reduce the number of queries, or speed things up by using $wpdb https://codex.wordpress.org/Class_Reference/wpdb to directly query the database.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.