Is it possible for a mesh device to know which other mesh devices it is connected to directly?

The current official firmware does not (yet) provide a way to do what you want. We'll need some more Mesh introspection functions (which hopefully will be coming soon-ish?) so that we can know things like what other nodes are in the mesh network, which ones are "directly" connected, or at least maybe the signal strength RSSI between two given nodes.

It might be possible to build your own custom firmware, though, and use the Nordic SDK directly. This might be one place to start, if you want to give that a try: