Good find!
It's not a doc bug, it's a product bug - a regression
introduced in Emacs 29. In prior versions it works
as the doc says: (dired-get-marked-files nil 'marked)
returns the file name on the current line.
Wait, so dired-get-marked-files isn't
supposed to be able to distinguish between
a single explicitly marked file and no files being marked? But that's information
that I need. How do I get it, if not with dired-get-marked-files?