Is it possible for a professor to write for an undergraduate student who is applying for a graduate program, a negative letter of recommendation? More like a minor criticism? If so doesn't this affect the student's academic career?
Yes. Letters of recommendation are sometimes called letters of reference, to emphasise that they can contain both positive and negative remarks on person's performance, achievement and character. Most people are not perfectly excellent in everything they do; they have strengths and weaknesses. A fair letter of reference should reflect both.
If so doesn't this affect the student's academic career?
If you ask someone to write you a letter of recommendation, you should expect them to speak their mind and give you a fair assessment that you deserve. If you are not ready to accept their judgement, do not ask them to serve as a referee. Surely, a negative reference can negatively affect student's academic career, just like a positive one can positively affect it. The same can be said about academic grades --- you pass an assessment, it is graded, and your academic career is affected by this grade. Not every grade is good, and neither is every reference letter.
Having said that, many academics will probably refuse to write any reference at all, if they don't feel that they can write a positive one.
If a letter of recommendation doesn't affect the student's academic career negatively, then it's not actually a negative letter of recommendation (LOR).
It is perfectly fine to add minor negative points about a student, provided that they do not indicate unsuitability for what the student is applying for. If your interaction with the student was in a way that you have to do that in order to write an honest letter of recommendation, the best course of action is to advise the student to seek a different LOR writer. If they insist on you doing that, then they have been warned (depending on the culture, you may need to add explicitly that the LOR won't be positive only for them to get the message).
Actually, a minor negative point can add trustworthiness to a letter of recommendation. If everything you write about a student is completely positive, then it may not appear to be representative of the student's performance or ability but may look like a canned LOR given to all students. To avoid this impression, adding some information "between the lines" is however sufficient.
Sure, it's possible. If you're asked to write a letter of recommendation then it is open to you to do so, and to write a negative recommendation if you think that is warranted. In practice this is rare, because most of the time, if an academic has a negative view of the student then they will just decline to write the letter. So it is possible to write a negative letter, but it would be unusual.
As to putting a minor negative point in a generally positive letter, that is much more common. Indeed, you don't always have a student who is so good across the board that there is no area of development that is worth mentioning. Usually a positive letter of recommendation will give an overview of where the student stands relative to their cohort (e.g., all students in their year, students you have previously taught/supervised, etc.), and then it will talk about their strengths and then talk about areas where they might need some further development if accepted to the relevant program. For a positive letter the positive points will substantially outweight the minor areas for development, but you would usually still mention them if you think they are substantial. In some cases a student is good enough across the board that the letter is entirely positive, but not always.
tldr; Many letters have varying comments, it won't necessarily sink an application.
I have written many letters and read many as part of our graduate admissions committee.
I'd say that there are a wide range of letters from the absolutely glowing to the "tell it like it is" variety. After all, there are a wide range of students interested in graduate school.
Having some level of criticism, minor note of critique, or measure of faint praise is not uncommon. For our chemistry graduate program, we often have ~350-400 applicants.
Does it affect a student's academic career? That depends a lot on the whole portfolio. And probably what school is evaluating you.
If we see one or even a few negative comments from one letter writer, but the rest of the application is strong, we'll probably write it off as a possible issue between the student and one professor. (After all, we're all human and personalities don't always mesh.)
If we see multiple notes across the letters, we may have a reservation about a student. But that doesn't necessarily sink the application. Maybe we decide to admit and give them a shot, but they don't get a fellowship. We'll still read the personal statement, transcript, etc.
Most faculty will be up-front when a student asks for a letter. I can remember one case, where a frankly mediocre student in my class asked for a letter. I suggested they ask someone else since they were currently getting a "B" average in an upper-level course. They felt despite their current grade, that they needed a letter from a classroom instructor, because they had two research experiences and letters from those.
My letter was fair. I mentioned that I believed the research letters would better evaluate how the student would do in grad school, and that they had a "B" in an admittedly tough upper-level course (quantum chemistry).
I don't know if that student got into their top choice, but they did go off to grad school and got a Ph.D.
Top schools likely have hundreds of top students. A minor critique could sink your application. On the other hand, there are plenty of strong grad schools (we're usually ranked 25-40) that are willing to take good students even if there's a minor note here or there. Students are human and there are often stellar students with imperfect applications. I've seen countless in this category.
I don't know about negative, but you can certainly write a lukewarm letter of recommendation which is basically not a recommendation.
I knew a mathematician who I won't name, but he/she had a famous supervisor who wrote him/her some ''lukewarm'' letters of recommendation. This caused him/her to end up at a rather obscure university despite his/her ability and definitely had an effect on his/her career.