You are right to suspect that veterinary surgeons would be exempted from conscription as regular soldiers in the UK, during the Second World War. However, they would have served first as volunteers in their capacity as medical professionals and later as conscripted professionals in their field.
Such professions or occupations that were deemed important to the working of the national economy so as to be exempted from conscription were referred to as Reserved Occupations. The 1939 list of Reserved Occupations as determined by the Ministry of Labour to Parliament can be found here. As you will note on page 30 of the document in the right hand column, veterinary surgeons are considered a reserved occupation with no age restriction. However, as you can see on page 3 of the document it is indicated that:
Nothing in the Schedule restricts—
(c) acceptance for whole-time service in war in the volunteer's
trade or professional capacity ;
Emphasis mine. This means that should the person wish to volunteer in their capacity of reserved occupation they may do so and serve in said occupation.
Now the list of reserved occupations changed throughout the war. An example of this being coal miners, which were not considered as having a reserved occupation at the outset of the war if they were aged 18-23 or 18-25 depending on their exact job. Understandably, this led to a deficit in men working in the mines and a corresponding decrease in output, the government, in December 1943, then allocated one in ten conscripts to coal mining to alleviate the problem see this link for more about the so called Bevin Boys.
In the case of veterinary surgeons the change in their status of a reserved occupation came in 1943. From A Short History of the Royal Veterinary Corps:
Until 1943 the Reserve Army, the Territorial Army and volunteer civilians provided the additional veterinary officers required. Then the huge expansion of pack transport for the campaigns in Burma and Italy led to an increased demand for veterinary officers that could only be met by imposing a form of conscription on the profession. Some 500 officers served with the RAVC during hostilities, most of them veterinary surgeons.
So James Herriot seems to have been called up due to the opening of the Burma and Italy campaigns in 1943 and the change in conscription which that brought about. Thousands of mules, horses, camels, dogs and even elephants would require professional care. Not to mention that it would also sometimes fall under the corps duties to inspect and tend to the animals that would become soldiers' meals.
Note: Thanks to Stuart F. for pinning down the date that the change in conscription happened for veterinary surgeons.