Short answers first, explanations follow:
No, a grad student TA, or any TA, should not be telling a student to leave a major.
No, it is not, nor should it be, generally acceptable conduct for TAs.
No, you should not let the professor know. (A friendly word to your friend, the adviser, is in order.)
Clearing the air just a bit, in light of existing answers and comments.
It is, sadly so, possible that there was a sexist bias involved in the TA's behavior. Addressing that, however, would be assuming facts not in evidence, and should be left to the proper personnel, should anything else be done about it. I am not dismissing the existence of such biases, nor discounting that it might have been a factor in the reported incident. I am only stating that if that is the case, it should be dealt with by the proper people when, and if, the incident itself is addressed.
The degree of experience, or time in the position as TA, and the differential between the TA and the student in subject matter, or academics in general, has no relevance. Only that the actor is a TA and not a professor or academic adviser has bearing.
The respective genders, or other "protected class" status does not matter to this answer. Even if it were a cat and a dog, the answer, and recommendations, remain the same, and stand on their own.
Exactly what a TA is expected to do, and is in fact "authorized" to do, will vary between institutions, departments, professors, and even individual TAs themselves. The title of the position itself gives a good beginning into delineating the TA's purview. A Teaching Assistant is an assistant. The TA is not a substitute for the professor, nor a replacement for mentors, advisers, or any other staff position. They assist the professor they are assigned to, in what ever manner the professor has instructed them. The student's perspective of the TA is as an agent of the professor, including the expectation that the TA's statements of progress are valid, and supported by the professor.
It is acceptable for a TA to grade papers. Doing such is a process of evaluating, or assessing, the work - on a single assignment - against the expectations for that assignment. The professor, when assigning such work to a TA, has deemed that TA's ability to make the same assessments on that assignment as they would themselves. There may be other assignments which the professor lacks such confidence, and does not have the TA review, or where the TA's work is reviewed prior to issuing the final grade for that assignment. The TA can be qualified to determine that a word is spelled correctly while not being qualified to determine if the usage of the word is appropriate. If a TA were to begin grading papers which the professor had not assigned to them, the TA would be out of line, even though they do grade other papers.
Commonly a TA will have a deeper relationship with the students than their professor. The TAs work with the students more often, spend more time in one-on-one interactions, and see some of the progress, and difficulties, which the professor may not. In that light, it seems appropriate for a TA to raise concerns they might have about a student with their professor. It is not appropriate, however, for the TA to advise the student on course, or major, selection. If the TA and the student have developed a good rapport, and the student asks the TA directly for their opinion on the choice of major, then it is inappropriate for the TA to advise the student on course, or major, selection. (Yes, that is redundant. Intentionally so.) Professors, when they think they have enough knowledge about the student, and the student's progress and prior performance might offer such advice. That, however, is not the question here. Were I to find myself as a professor with a TA who did offer such advice, I would be looking for a new TA, even if the same TA had been working for me a dozen years.
What you can, or should, do with the knowledge you now have is offer to help the student address the incident through the proper channels. There are probably two avenues available: the professor and some "office" at the institution. As you know someone there, and have been there yourself, you should either already know which office to contact, or can find out from your friend who still is there. My preference would be to address the issue with the professor first, and escalate it with the proper office if the professor does not deal with it to the student's satisfaction. Although it is possible that the professor may suggest the alternative as well.
As you already know the student, and she apparently values your input, you should take the time to counter the negative impact of the TA's actions. Whether or not the TA's evaluation is correct doesn't matter in this regard. You can restore her self-confidence to the point where she is willing to talk to faculty about it, and offer to help with introductions, if possible and appropriate to the current institutional setting.
In addition to helping her address the situation, you can also contact your friend who is still working there. Without naming the student you can notify that adviser that the TA is making such statements to students. It may have been said jokingly, or in a moment of intense frustration. Such information might be considered by the faculty addressing the incident. Neither case, however, justifies, or excuses, the TA's statement. Informing your friend is not to help the student, which is why you don't give her name, rather it is to prevent future incidents with that TA's interactions with students, the one you know and the rest that you don't know.
See also the excellent answer here from Buffy, who has the experience to speak authoritatively to the issue.