It should be possible.
DeSmuME allows you to load a slot-2 rom and save to interact with the slot-1 game being played. All you would have to do is load a LeafGreen rom and your save file, and you'd be able to transfer to a HeartGold save that progressed far enough to access Pal Park.
As none of the Pokemon games aren't officially supported by DeSmuME's developer, I'd suggest you save often to avoid crashes.
As DeSmuME uses its own .dsv save format, you'd have to import your .sav using the "Import Backup Memory" option, and then export the save once finished using "Export Backup Memory" to ensure it'd still be compatible with your flashcart.
If you don't use a DS flashcart, and are in fact using the retail cartridge, you'd need a way to dump the save using either a homebrew 3DS or a hardware cartridge dumper, but the steps afterward would be the same.