Based on this Ran it would seem that a ben Noach would be permitted to afflict himself. Since by doing so he is not stealing from anyone it should be permitted. However, the Rambam says (hilchos Sanhedrin 18:6) that beis din does not kill or administer lashes on a person based on his own admission. The Radvaz there writes that the reason for this halacha is because a person is not the owner of his body; rather it belongs to Hashem. Generally when a person makes an admission that he owes a sum of money he is believed more than if two witnesses attest to the contrary. This is because a person’s money belongs to him. However concerning afflicting one’s body one is not the owner and may not chose to do so. Therefore he will not be believed when he testifies to beis din that he is deserving of death or lashes.
Based on this we can understand the Meshech Chachma mentioned above. If a ben Noach will afflict himself we can compare it to stealing. Since he does not own his body, if he afflicts it he is stealing from Hashem.