I wanted to use JEI on a Realms server but had this same problem. I tried using 25.0.44, as mentioned above, and was indeed able to connect to Realms, however, JEI didn't work (I'm using JEI version 1.13.2-5.0.0.8, by the way). I could see the controls listed under settings, but no actual functionality was present.
So I just tried a whole bunch of different versions of Forge. I didn't try every version of Forge, but I did narrow it down to this:
Any version of Forge from 25.0.63 or newer won't connect to Realms.
There is no 25.0.62.
Any version of Forge from 25.0.60 or older connects to Realms, but JEI doesn't work.
But by some miracle... Version 25.0.61 connects to Realms and JEI appears to be working.