Re: is it allowed in islam?
It would be “treason”. India would need to decide how to handle it.
Britain already faced this issue in World War 1. It desperately needed Indian soldiers to make up the numbers for its army, but faced a severe problem. Britain was at war with the Ottoman Empire, and pre-war surveys had shown that the majority of Indian Muslims stated that they owed more loyalty to the Ottoman Empire than to the British Empire. Around half the British Indian Army were Muslim.
Britain had the choice between trying to force its Muslims to fight against the Ottoman Empire, knowing that they would choose to commit “treason” rather than go against their religious beliefs, or trying to accomodate this instead.
As a result, Indian Muslims were only sent to fight in Africa and Western Europe, were there was no chance of them having to fight the Ottomans who they believed their true loyalty was to. Only White, Hindu and Sikh soldiers were sent to fight against the Ottomans.