I figured it out. It is a 3-step process:
struct tree *head = get_tree_head();
struct tree *t = get_tree( o, l, head );
struct module *m = find_module( t->modid );
This gives the module name, the filename, and a list of imports made by the module which can then be looked up further. When calling this with the .1.3.6.1
example from the original question, this gives me:
NAME=SNMPv2-SMI
FILE=/usr/share/mibs/ietf/SNMPv2-SMI
COUNT=3
#0: LABEL=joint-iso-ccitt, ID=-1
#1: LABEL=ccitt, ID=-1
#2: LABEL=iso, ID=-1