An iRig, Apogee Jam, or similar adapter plugs your guitar or bass into your device. The recorder in iReal Pro will pick it up, and on Mac you can choose it under Audio Input, but iReal Pro offers no amp simulation, no effects, and no monitoring. For a guitar tone, run the instrument into a recording app instead and let iReal Pro supply the band.
In GarageBand (or Amplitube, or another app), add a track, choose a guitar amp, turn on monitoring, and set the gain. Then export the backing track from iReal Pro: tap or click Share, choose Share Audio, and pick WAV or AAC. Drop that file onto a track in the same project and play along.
Wear wired headphones so the band does not leak into your recording.
See Record yourself on the iReal Pro website.