Partly depends what you mean by that. The British army wasn't segregated, a Sikh man who joined the British army having been living in Britain before joining up would have joined a regular british army regiment and been deployed along with white british soldiers. This scene is therefore entirely plausible but because a lot of the migration from India to the UK took place after the second world war it wasn't especially common.
Had they volunteered in india however they'd be joining the British indian army rather than the regular british army. Indian units were deployed alongside British ones and some times at the battalion level Indian and British army battalions did sometimes brigade together but generally it would be rare for indian army troops to be detached to british army units at a smaller level than that.
In a more general sense the majority British Indian Army that fought in the first world war was deployed to fronts in Africa fighting in the German colonial empire. Many went to parts of the middle east to fight the ottomans, particularly in the Mesopotamian campaign. Others had to remain in india, it being particularly necessary to keep troops to police the Afghan frontier region. That's not to say they didn't fight on the western front, particularly earlier in the war, but especially by 1917 Indian troops were being used in fronts closer to home primarily.