Were nicotinic acid/amide or flavin nucleotides ever part of primary RNA sequence?
There are naturally occurring RNAs that contain a NAD &quot;cap&quot; at 5' end (Bird et al., 2018; Wang et al., 2019).
I could not find any papers on natural RNAs with nicotinamide or flavin as a regular base. However, a study with synthetic oligonucleotides reports that NAD containing oligonucleotides can form stable triplex structures (Göckel &amp; Richert,2015).
There are two studies from 1970s that explore base pairing potential of flavin. Raszka and Kaplan (1974) report that FMN can hydrogen-bond with AMP but not other nucleotides. They further explore this finding to show that FAD can form intramolecular hydrogen bonds. Scarbrough et al (1976) show that flavin containing nucleotides can form stacking interaction in addition to base pairing kind of hydrogen bonds. (Compare D-X bonds)

More recently, Julius et al. (2020) have shown that NAD and FAD can act as co-factors of primase to initiate DNA replication.
Overall, it seems plausible for FAD and NAD to be a part of nucleotide chains (more plausibly for RNA as they are already known to contain a variety of unusual bases). However, I cannot comment if they really did play such a role during cellular evolution.