Who is the "they" who do the saying?
"When they came to Bethlehem, the whole town was stirred because of them; and they said, 'Is this Naomi?'"

It cannot be the same "they" as came to Bethlehem for that "they" includes Naomi. The only other candidate is "the whole town" - since "they" is feminine this makes the "whole town" feminine too.

Though since "town" is feminine this may mean no more than the use of a plural rather than a singular verb by a grammar conscious scribe - the author is not so concerned by grammar.