An R4 card (or similar flashcart) lets you run GBA ROMs on a Nintendo DS/DS Lite via the GBA slot—but it's not "cheating" in the traditional sense. Here's what it actually does:
Technically, yes—activating cheat codes modifies game memory for advantages. But the R4 itself is a homebrew/backup device; cheats are an optional feature.
Alternatives: Replay on higher difficulty, try challenge runs, or use save editors on PC emulators (mgba, VisualBoyAdvance) for single-player experimentation.