If I understand correctly, you're using your Casio like a sequencer to record MIDI tracks to its internal memory (or using preset rhythm patterns that are already stored in the Casio). You would like to record those tracks into a song that you have set up in Reaper, with everything aligned to bar and grid. Correct?
No problem at all, provided your Casio can receive and/or transmit Midi Time Code (MTC, or whatever the latest technology is). It's easy. I used to do this on every project back when I was working with drum machines (it was Cakewalk back then, but the principles apply to any DAW).
You'll need to dig into your manuals and menus. You'll need to set your Casio to either send or receive timing information, and Reaper vice versa. One will be the master, the other the slave. Once you're properly set up, the master will control the tempo and timing, while the slave will play back in sync.
Once you get it set up, the best course is to have the Casio send Reaper MIDI data rather than audio. You'll record the MIDI data on a track that is set up send it's output back to the Casio. That allows you to do your editing in Reaper while using the Casio as a MIDI keyboard and tone generator. Then, you'll need to set up a second track to receive the audio output from the Casio for recording.
Sounds more complicated that it is. Let us know if you need help with that once you have got the two synced.