No, it wasn't a lobotomy.
Alex's brain has been reprogrammed using the aversion therapy:
Aversion therapy is a form of psychological treatment in which the patient is exposed to a stimulus while simultaneously being subjected to some form of discomfort. This conditioning is intended to cause the patient to associate the stimulus with unpleasant sensations with the intention of quelling the targeted (sometimes compulsive) behavior.
This is a well-known (albeit controversial) method of curing "undesirable" behaviour: from biting nail (by painting them in bad-tasting nail polish), through alcoholism (by providing alcohol together with Disulfiram, which causes painful reaction when ingested with ethanol) to attempts to "cure homosexuality".
In this particular case, he was forced to watch movies depicting violence at the same time he was given a medicine that was making him feel sick. This made him unable to act violently without feeling the same nausea and pain. As the unfortunate side effect of this therapy, he was also reacting in the same way to his beloved classical music, which has pushed him towards suicide.
In the end, the therapy is reversed, but again it is not done via lobotomy, but possibly via a brain surgery. People that have gone through lobotomy behave much different from Alex - they are passive, docile, almost zombified:
The purpose of the operation was to reduce the symptoms of mental disorders, and it was recognized that this was accomplished at the expense of a person's personality and intellect. [...]. Following the operation, spontaneity, responsiveness, self-awareness, and self-control were reduced. The activity was replaced by inertia, and people were left emotionally blunted and restricted in their intellectual range".
Here we can see that while Alex is not a brilliant genius, after an initial confusion, he starts replying quickly in a way typical to himself - talking about sex ("in and out") and violence, and he gets quite excited about it, to the point where he hurts his arm - this wouldn't be a behaviour of a lobotomised person.
Indeed, as @Tetsujin mentioned, there is one more chapter in the book showing Alex a few years later leading a new gang but slowly getting bored with such life.