Technically, trade/barter is still a transaction - but surely, if you simply trade HARDWARE components, that's fine - any software that happens to be on there is his own business.
Or simply remove the ROM files and let the other party obtain them through other channels, leaving him instructions on where to put them.
Still - you should own all your roms!.