I ended up creating this function to help do what I needed.
DEFINE_PATCH_FUNCTION ~REF2STR~ // given tra reference, strref, or string, returns appropriate string
STR_VAR ref = ~~ // e.g. ~@123~, ~#9241~, or ~Anything that isn't numbers preceded by @ or # is a string, like this is!~
RET str
BEGIN
PATCH_IF ((~%ref%~ STRING_MATCHES_REGEXP ~[@#]-?[0-9]+~) == 0) BEGIN
INNER_ACTION BEGIN
<<<<<<<< .../inlined/mi_ref2str.tph
OUTER_SPRINT str %ref%
>>>>>>>>
COPY - ~.../inlined/mi_ref2str.tph~ ~.../inlined/mi_ref2str.tph~
EVALUATE_BUFFER
REINCLUDE ~.../inlined/mi_ref2str.tph~
END
END
ELSE BEGIN
TEXT_SPRINT str ~%ref%~
END
END
Then I could sneak tra references and strrefs into functions inside of a string.