It sounds like iTunes is showing songs are on your iPhone, but they are not listed in the Music app on your iPhone. You have taken some really good steps to troubleshoot this, and thank you for all the information you provided. For an issue like this, I recommend resyncing the music to your iPhone.
If you are syncing automatically, resync content to the iPhone by unchecking "Sync Music" and click "Apply," then check "Sync Music" and click "Apply" again.
If you sync manually, delete the music when your iPhone is selected in iTunes and drag new content to your iPhone.
You can find the syncing steps in the following articles:
Thank you for posting in the Apple Support Communities.
Thank you Sheila, that would have probably solved my issue.
However, in the meantime I've found another workaround.
In order to permanently remove songs from the phone, I had to delete them from the itunes library. After that I connected the phone, selected Autofill, and finally the songs were removed.
I then added again in itunes the directory in which the song files were placed, autofilled and finally got all my music back on the phone.
Next time I'll probably do as you suggested.
Btw, I've also probably found out why the songs were doubling on the phone after connecting to itunes. I think it has to do with the fact that I converted some of them to mp3, which left both the m4a and the mp3 version in the same directory. I've moved the mp3 files in another directory, and everything seems to work fine now.