Thanks for your question. It's a tricky one, for sure.
It may be that your grandfather and his brother changed their surnames from Reck to Ray as a way to "fit in", but I'm not so sure about this from an Irish standpoint. Reck, rather than being a surname of Irish origin, is of German origin. Perhaps, given the British Empire fought on the side of the Allied Powers and Germany fought on the side of the Central Powers, this may be the reason behind the name change.
The reality is that Irish surnames feature prominently on World War I memorials in many towns and cities across Great Britain itself. I am unable to see much evidence that Irish soldiers who fought with an English regiment changed their name, but certainly it is possible in some cases, as it seems to be with your family members. Perhaps someone else in this Community has a firmer answer.
Are you currently researching your family ancestry? If so, I would encourage you to check out this page
for some useful information and advice.