One could call an in-line script for each directory. The script would check whether the pattern matches any regular files in the directory. If the pattern matches, it outputs (in the general case, processes rather than just print) the matching pathnames and prunes the parent directory from the search tree:
find /top/dir -type d -exec zsh -c '
set -- "$1"/pattern(.N)
[[ $# -eq 0 ]] && exit 1
printf "%s\n" "$@"' zsh {} \; -prune
I'm using the zsh shell for the in-line script to access that shell's globbing qualifiers. The qualifier used here, (.N), ensures that only regular files match the pattern and removes the pattern if there are no matching files.