I could say also that the soldier obvious has the rank of ____ due to my deep knowledge of British army rank insignia.
That would be a lie.
But cheating by looking at the Wikipedia article on British army rank insignia I deduce that he was probably a lieutenant in the period 1800 to 1902 or second lieutenant after 1902. The golden thread "things" on his shoulders each have two metallic appearing objects. The ones closest to his neck don't matter since they are part of all rank insignia. The ones farthest from his neck are probably "Bath stars".
In the period 1880 to 1902 a lieutenant's rank insignia was one Bath star, and after 1902 a second lieutenants' rank insignia is one Bath star.
Since Lila Sampson is said to have flourished as a portrait painter from 1904 to 1922, this is probably a second lieutenant from 1904-1922.
I believe that in this period there would be about one or two second lieutenants per company in this period, eight companies per battalion, and usually two battalions per regiment, and thus about 16 or 32 second lieutenants per regiment. They might serve for a couple of years before being promoted, so in the 18 years of Lila Sampson's career there might have been 144 or 288 second lieutenants in the Devonshire regiment.
During World War One the Devonshire Regiment expanded to a total of 29 battalions. I don't know how many of the hundreds of new second lieutenants during the war would have had red full dress uniforms like the one in the portrait.