There is a realpath C function, though. So maybe one of the other utilities uses it secretly?
From the top of my head, I'm not aware any of those utilities reference the realpath function in their specification.
What I know is that test for directory entries often returns true when a pathname is resolved to an existing directory entry ¹ + x.
Peeking into the implementation in dash(git.kernel.org), it uses lstat64/stat64.
This may suffice for directories (test -d pathname) to cd into them and return the resolved pathname with pwd.
For cd, CDPATH should be unset or empty², and the operand should not be the hyphen-minus "-".³
([ -d "$1" ] && [ '-' != "$1" ] && CDPATH= cd -P -- "$1" && pwd -P)
Example: Return a directories absolute, normalized and physical pathname, null if it does not resolve to a directory.
If it is an issue to exclude the hyphen-minus ("-") as pathname, an alternative is to set the operand to "./-" for this specific case.
¹ cf. test;
² cf. cd step 5 description,
³ cf. cd "-" operand
As I could read, you're already aware of dirname and basename, perhaps also about how to check if [a] symlink [(symbolic link)] is broken or doesn't exist Unix&Linux, and if not, see there if it is of interest in the context of this answers' test usage, e.g. to differentiate on a test -d pathname exit status of 1.