Hi there,
The online solver also provides this information -- if your image is solved by the index-5200 series files. In that case, you will see that the RDLS and CORR files contain data from the Gaia catalog - if "ref_cat" is "G2" then it's a Gaia-DR2 star, with gaia sourceid = ref_id.
For images that are wider (in field-of-view), then probably the index-4100 series produces the solution. I have not yet updated those files to contain the equivalent information (from the Tycho-2 catalog). So using the local code won't help in that case.
cheers,
dustin