Q. Why does Kohelet (which we read on Sukkot) say (1:12), “I was king over Israel in Jerusalem”? If the author is King Solomon, surely he wouldn’t use the past tense?
A. Some say that melech doesn’t need to mean king but can denote a rich man, a landowner (look also at Prov. 31:1).
If in this case it means Solomon, Ibn Ezra’s idea is that the king wrote this book when he was old and rather cynical and looked back over his career on the throne with all its ups and downs.