Indeed, you are right, doc.FirstXRefInDoc really returns Xref object, I was misled by line number that returned the undefined error, also thanks to this I was able to eliminate the real source of this particular error: I tried to get the next Xref by calling doc.NextXrefInDoc, but while FirstXrefinDoc is a property of Doc, NextXrefInDoc is a property of particular Xref, hence the undefined error. In your code, xref.NextXrefInDoc would return next cross-reference. Now I am able to traverse through all cross-references in doc.
However, the core of the problem persists - neither doc.UpdateXRefs, nor xref.UpdateXRef seems to be doing anything, Although the cross-references do not manifest themselves in Framemaker as unresolved (they point to a correct document and are "green" in cross-reference panel) calling update does not refresh their text (e.g.: page 14) - it is empty and only gets populated when I manualy select Edit - Update References.
When saved as mif file, these strange cross-references do not have <XRefLastUpdate> property (not even after calling doc.UpdateXRefs). This property is only generated after the mentioned manual process. So what really need is something that triggers the same process that populates those xrefs. Maybe it is not UpdateXRef, however I can not find anything analogous in documentation.
Thanks for your help so far