What you will need:
- Apogee Jam or iRig guitar interface adapter for iPad , iPhone, iPod touch, Android and Mac 
- Garageband (or other app for effects and amp like Amplitube) 
- iReal Pro

Steps:
- Launch GarageBand and create a new song (or similar app as above)
- Choose “Guitar Amp” and turn on the monitor
- Adjust gain

After that open iReal Pro and play along or tap on Share on the top right and select Record.

iReal Pro version 8.3 or higher:
If you record with GarageBand or similar apps, export your iReal Pro backing tracks in WAV format which is now a very fast process.
Then select 'Copy' (or Audio copy in older iOS versions) from the share sheet options and paste it into GarageBand.

iReal Pro 8.2.4 and lower versions:
There are 2 solutions:
1. Open GarageBand, add a new track and select an Inter-App Audio app. Open the Instrument browser and tap select iReal Pro. Record the song from iReal Pro and a new track to record your playing.    

More info here: https://support.apple.com/en-us/HT202870

2. You can listen to/record any track directly from iReal Pro into GarageBand with Audiobus and use effects. 
You find a tutorial here how to record the sound directly into Garageband.
http://www.lynda.com/GarageBand-tutorials/Importing-audio-Audiobus/109363/144096-4.html 
In iReal Pro, go to More/Background Audio and make sure that it's set to ON.
For an audio app to run background audio, it would have a setting for background audio OFF/ON. To run another audio app in the foreground at the same time, this app must allow the background audio through (many apps do not do this so you have to check.)