I found that my former PhD advisor was still listing me as his student and he was the chair of my committee. I changed advisors a few years ago and left him. He didn't remain in my committee. It is true that he was my advisor to that point. But I feel it's not fair to my current advisor, who actually supported me and guided me to dissertation and graduation. Since I didn't graduate under the former one, my name doesn't have graduation year in his CV, which looks like I dropped out. If a professor was an advisor of a student at some point, can he list the student as his student forever?
TL;DR: Yes, he can.
He can list you; probably he'll hide that you left him, but who cares?
You graduated and whenever you apply, your CV will show that. Nobody will check his CV for your graduation.
Theodor Fontane (a German novelist) famously said, "Happiness is a good stomach and a bad memory." Forget about him and care about your future.
This just isn't a situation you need to worry about at all. No one is going to notice or care that you're listed on this CV, and if they do they'll just assume the CV is out-of-date. Your former advisor isn't getting any meaningful benefits from listing you, so fairness isn't an issue. One extra student isn't a big deal, and furthermore during serious evaluation more detail would be given. For example, when I'm evaluated for raises there's separate sections for current Ph.D. candidates, for graduated students, and for reading courses supervised. A former student who switched advisors would "count" under that last category but not the former ones.
If a professor was an advisor of a student at some point, can he list the student as his student forever?
Depends what you mean by “list”. If he does it in a way that creates a misleading impression that you graduated under his supervision, then no, that’s dishonest and obviously unacceptable.
If he just lists you in a section titled “Students” or “Students mentored” and you are mentioned there with no specifics, then it’s fine, that is a factually correct representation and I don’t see why you should complain or care. Be thankful for the mentorship you received from him, and be even more thankful you ended up with someone who was a better fit for you and who isn’t so insecure that they need to pad their CV with pointless fluff about people they helped in some not very significant way.
I am not sure what you want. From the title, it seems like you want to know that if a professor can list in his CV his former student who left him. In this case, I find nothing wrong with listing you as a "former PhD student".
However, from your text, you think the way he list you damages your reputation (I might be interpreting this wrongly). This is because listing you without an graduation year could implies that you are a "drop-out".
I feel what you felt. If I was you, I would email my previous advisor's assistant asking him to either add a graduation year, or remove me from his student list, or specify that I transferred to another group. I think all of these three requests are reasonable.
Any comments, long or short, are welcome if you find my interpretation or my suggestion wrong.
So in sum, I think listing previous student is a grey area: to list and to not list, both are reasonable. There are a lot of professors list no student on his website or CV. One similar case is can you list someone who commented your paper or your idea in the acknowledgement list? I think by default, you could always acknowledge him, but not necessarily unless he did help you a lot or he asked you. Even if he contributed a lot, he still has the right to ask you to remove his name.