Make companion stop following without knowing where they are
If your follower isn't around anymore, they most likely went home. Go back there and you should see them again, allowing you to summarily dismiss them for the cowardly and lazy follower that they are.
I ran into this because I was on the Companion quest 'Proving Honor'. I forgot that Farkas was waiting at the dungeon entrance for me, and apparently even though I'm not actually with him yet, this counts as a follower. So watch out for that and similar quest partners.
Try fast traveling. It worked for me once.