If you write a thesis, is it legal to ask somebody if things you did are correct in the thesis? When it's my own work and this person says, everything correct, there shouldn't be any problem, right? When does plagiarism start?
From a publication point of view:
In general, this is nothing else than peer review and totally fine.
As long as the other person only tells you "all good", or "this here doesn't look good, maybe rewrite it so that X is more clear", that is no problem at all. If the other person writes the whole new version for you, that is obviously not good. Either way, this wouldn't be plagiarism in this case. Plagiarism means copying from a different paper/book/source without properly mentioning it. What this would be is someone else writing (part of) your publication without getting mentioned. That is at least as bad as plagiarism, but it is something else.
Depending on the level of help you got, consider mentioning the other person in the acknowledgements.
From a university point of view:
A thesis isn't completely the same as a paper, so here, other rules might apply. At some universities, you have to sign that you didn't use any sources or help apart from the ones clearly mentioned and cited. Thus, rules might be stricter here. While I would not worry about, say, a math major getting feedback on their English grammar by someone who has no idea about math, as soon as the one reviewing your work is from the same field and/or also gives feedback regarding content, this is something that should be cleared with your advisor first.
Certainly where we are it would be seen as very poor practice for your supervisor not to have read and commented on your thesis, and in certain circumstances might be considered negligence on the part of the supervisor.
My answer will complement that of user Dirk, but partly counter it. Yes, you need to follow the stated rules of your university. But ....
In most larger universities, students get a lot of help on their theses, not just from their advisor, and not just on their writing style. In both of the graduate (R1) institutions at which I studied I was part of a (mathematics) research group in which ideas were freely shared. The groups held weekly seminars for discussion and sharing. We would make suggestions to one another and get advice from the faculty members of the group. No one ever suggested that I wasn't sole author of my dissertation or the paper that resulted from it. My advisor was acknowledged, of course.
So, I doubt that the sort of "help" you got would be considered wrong, though the formal rules apply. You didn't ask for, or get, corrections to your work if your statements are accurate.
I think such research seminars are a marvelous thing. The insights that led to my dissertation were mine, though I suspect that my advisor had them in parallel also. The "help" from the seminar didn't lessen the quality or value of the research experience. In fact, it is how real researchers in the real world actually work. It would be foolish to lock yourself up in an office until you produce a paper with no outside consultation. Research activity would stop.
And plagiarism is only using someone else's work without attribution. I don't see it as having any bearing here. And, as I said in a comment, neither is it a legal issue.
Note, for the record, that my Erdős Number is 2. We value collaboration in mathematics and related fields.