The NET Bible notes:
The meaning of קֹהֶלֶת (qohelet) is somewhat puzzling. The verb קָהַל (qahal) means “to assemble, summon” (HALOT 1078-79 s.v. קהל), and is derived from the noun קָהָל (qahal, “assembly”; HALOT 1079-80 s.v. קָהָל). Thus קֹהֶלֶת might mean: (1) convener of the assembly, (2) leader, speaker, teacher, or preacher of the assembly, or (3) member of the assembly. Elsewhere in the book, קֹהֶלֶת is used in collocation with statements about his position as king in Jerusalem (Eccl 1:12), his proclamations about life (Eccl 1:2; 7:27; 12:8), and his teaching of wisdom and writing wise sayings (Eccl 12:9-10). Thus, קֹהֶלֶת probably means “the leader of the assembly” or “speaker of the assembly.”
Given that the book concerns itself with spiritual teaching, it seems reasonable to translate the word as "preacher". But that also carries some connotations in our culture that are not intended by the author. "Teacher" removes many of the connotations (and perhaps adds its own), so that might be a better choice except that it would lose the connection with "assembly". Many translations note the difficulty of this particular word. For instance , the ESV:
Or Convener, or Collector; Hebrew Qoheleth (so throughout Ecclesiastes)
Again, in the NET Bible notes:
Rabbinic literature treats קֹהֶלֶת as a traditional surname for Solomon, that is, “Qoheleth,” relating it to the noun קָהָל. For example, this explanation is found in rabbinic literature (Qoheleth Rabbah 1:1): “Why was his name called Qoheleth [קֹהֶלֶת]? Because his words were proclaimed in public meeting [קָהַל], as it is written (1 Kgs 8:1).”
...
The feminine ending is used similarly in Arabic in reference to a male referent, e.g., Arabic rawiyat “a great narrator” from rawi “narrator” (C. P. Caspari, A Grammar of the Arabic Language, 1:233c). So קֹהֶלֶת may mean “the leader/teacher of the assembly” from the noun קָהָל. When used in reference to a male referent, feminine forms denote a professional title or vocational office (as in Arabic, Ethiopic, and Aramaic), e.g., סֹפֶרֶת (soferet), “scribe”; פֹּכֶרֶת (pokheret), “gazelle-catcher”; פֶּחָה (pekhah), “provincial governor”; and פְּרָעוֹת (pÿra’ot), “princes” (GKC 393 §122.r). Occasionally, a professional name later became a personal name, e.g., the title סֹפֶרֶת (“scribe”) became the name “Sophereth” (Ezra 2:55; Neh 7:57), פֹּכֶרֶת (“gazelle-catcher”) became “Pokereth” (Ezra 2:57; Neh 7:59), and perhaps קֹהֶלֶת (“assembler”) became the surname “Qoheleth” (HALOT 926 s.v. פֹּכֶרֶת הַצְּבָיִים).
Actually, I find this idea compelling. Occasionally I've noticed people do use a title as a name: "Mr. President", "Pastor Bob", "Doc", etc. Considering the book of Ecclesiastes is attributed to Solomon, who was considered the wisest man to ever live, it would not be a stretch to give him the formal name Teacher or some such. That seems more likely to be the purpose of the feminine than to attribute the work to a woman.
Conclusion
Whether Solomon himself wrote the book or not, interpreters have almost universally attributed the work either to him or to someone hoping to associate it with the man who had the reputation of being wise. That's the natural reading of "the son of David, king in Jerusalem."