If you have a linked body in a component, how do you determine which reference set the linked body is using? We can determine the body in the owning part, but not the reference set.
Can't you cycle through the ref sets in the owning part and check if the body you've identified belongs to it's object list?
Note a body may belong to more than 1 reference set (actually, if it is in anything other than "Entire Part", then "by definition" it is in more than 1 ref set).
Not that this gets you closer to your answer.
You may have to think of it in a different way, e.g.:
Is there a way to query a component (part) which of its ref sets is being used in the assembly?
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled