I have a somewhat dirty solution.
rg --heading --glob "*.txt" . some_directory_path | sed 's/^$/NEWLINEHEREYO/g' | tr '\n' ' ' | sed 's/NEWLINEHEREYO/\n/g' | fzf
explanation:
when you do
rg .
somewhere, it prints output to terminal in a specific format that gets lost if you try to pipe it somewhere. I find the format is necessary to be able to do this efficiently. Hence, the --heading flag which maintains the format.
--glob and the directory I added just because I did it in my own usecase, and I did not want to modify the command lest it break - I'm not that good with computers.
It then replaces all the empty lines, which delimit files, with the NEWLINEHEREYO tag using sed. It then truncates all the newline characters (which would destroy the empty lines) using tr, giving a single-line output, which is what you wanted. It then reintroduces the breaks with another sed command by converting the NEWLINEHEREYOs back to line breaks so fzf doesn't search it as if it was literally a single line.
It's very inefficient, but works ok for my usecase. I reckon the sed, tr and sed commands can probably be merged into one, but I'm too stupid to do it.