Sorry but no. When you enter a foreign country (or set foot on a newly contacted planet) it is your responsibility to be aware of what the local laws are. As they say, ignorance of the law is no excuse. Now, your newly arrived status might be seen as an extenuating circumstance and perhaps allow for a lesser punishment but it's not a carte blanche. That would not apply in Wesleys case because death was the only penalty provided for.
Their planet, their rules. Perhaps Starfleet should make first contact on board their ships until the legal details are known. This would only apply to races that are already aware of other intelligent life. For a true First Contact, Starfleet should have dedicated first contact specialists and leave the kids behind for a while.