ERROR: AUCTeX cannot find a working TeX distribution (macOS Sierra)
As patrix suggested, the problem was that the PATH variable that the error message referred to was not the Terminal's environment variable but emacs' own environment variable, whose content can be seen (as suggested by patrix) by evaluating (getenv "PATH") in Emacs. 

To add /Library/TeX/texbin/ to emacs' PATH variable, I added the following code to the emacs initialization file .emacs:

(setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/"))  
(setq exec-path (append exec-path '("/Library/TeX/texbin/")))


These lines of code are appropriately modified versions of the ones given here.

After restarting Emacs, the problem was gone.