Edit: It seems I am way to slow today. I will leave the post though.
A well patched/hacked game will in all probability not touch the memory locations for lives/amount of ammo and whatnot or pretty much anything a cheat would touch (it would probably be a nightmare to put right if it did)- existing cheats should work fine.
Where the trouble might come in is the tool that is used to rebuild the rom after patching/hacking/cracking it would change the header a little bit and so mess with the game detection methods of some cheat engines.
Easy way is to get a cheat making tool like R4CCE or something and change the relevant data in the cheat to that of your hacked rom's.
If you are feeling really bored there is next to no reason for the header to change when hacking a rom (just the ndstool and many other rebuilders will end up changing it)- note I am not quite sure what is actually used for the ID of a rom as far as cheats are concerned (and especially not with different cheat engines) so this may end up being impossible.