Before you rip the CD, select the track and choose "Get Info." In the "Options" tab, there are fields to edit the start and stop times for the song. Edit the stop time so that the track ends just after the main song, and then rip the track. iTunes will only rip it up to the new stop time.
Then edit the start and stop times again so that you capture the hidden song, and have iTunes re-rip the track.