Originally posted by Patchou
When you buy the domain name, you specify the owner there. As far as the ICANN is concerned, in your example, person A would be able to do whatever he wants.
If you're speaking about laws, then it's a whole different matter. If person B feels cheated, he can always sue person A and hope to have a good enough case against him to convince a judge.
What he said, with A and B switched.
For simplicity, Person A is known as Angus, and Person B is known as Britney.
Assumption: "provides a domain, free of charge, and sets it up" means "registers and pays for the domain name themselves (and points to to another person's website)"
The party who registered the domain name controls it, this is how registration works. If Britney has been letting Angus use the domain name and changes their mind, it's tough luck for Angus, the domain name is registered by Britney.
Of course, if Angus isn't happy with Britney's conduct, they may seek legal intervention. In this case, contract law and the agreements made between Angus and Person B will need to be looked at.
Case study: I had a free .tk domain. In this setup (freedomain.tk), Dot.TK registered the domain name for me, and pointed it to their own site, where they had a redirection to my site. Recently, Dot.TK asserted that my domain name was inactive, and that I should buy it from them, register it myself to continue using it. I didn't, and now the redirection has been changed from my website to an advertising page. Too bad for me, I shouldn't have relied on Dot.TK. I could sue them (and see how I go), but I'm lazy.