Yes, for this to be possible Forge would have to be compatible with Realms (there probably isn't anything we need to add to the mod for it to work). We haven't tested it though.
As for Forge compatibility, LexManos wrote on the 1.7.10 Forge release post:
Note on Realms:
Forge DOES connect and play on Realms servers just fine.
However, Mojang likes to push out many new versions of there Realms library, they have the ability to update there json files remotely, we do not.
As such if they update the required realms library version, you either have to wait until Forge updates, or manually edit your json file.
We are working on a simple method to automate this process, however, for the time being this is what we have.
Updating your json is really simple, go to your .minecraft/versions/1.7.10.json
Look for com.mojang:realms: There will be a version number after that.
Go to .minecraft/versions/1.7.19-Forge{ForgeVersion}.json
Find the same com.mojang:realms line, and update the version number to match the one in 1.7.10.
ONLY do this is you are having issues connecting to Realms!
As stated we are trying to find a more generic automatic solution. But mojang's launcher does not support the features we need in order for it to be possible.
(Not sure if that still applies to 1.8)