There is likely no publically available function to do that in LabVIEW. With that I mean that the information is internally in LabVIEW doable but there exists no direct API that would allow to do that from a VI or DLL. The reason is that the VISA refnums know both about the resource as well as the ViSession internally but a ViSession has no idea that it is wrapped by a VISA refnum. The only way to implement a ViSession to VISA refnum function would be a function that searches the LabVIEW internal list of VISA refnums for one where the desired ViSession matches the internal ViSession. Quite a bad algorithme with about O(m) performance.
It would probably be just as slow as retrieving the VISA resource name attribute from the ViSession and then do a LabVIEW VISA Open to get a VISA refnum.