We have a child in our neighborhood whose behavior is horrible. He manipulates my child (which my child responds to, inappropriately, by hitting...I should note, he does NOT hit other children), one-ups him, and more or less bullies him. Yet my child loves playing with him.
After quite a bit of discussion, my husband and I came up with this. When "T" is at our house, he is OUR child and subject to our rules. When other neighbor kids come over (who are mostly well behaved and kids I'd love for my child to know...who also come with parents most frequently, who discipline their own child), I would expect my child to be the host--and allow the children their way, treat them like guests. With T, we alter the rules (we have not told our son; he's four) and work on teaching him appropriate behavior. This is a child who "wanders" the neighborhood, knocking on doors to find a playmate; I've spoken to other parents whose children have better manners and some of them even use him to teach their children manners--"You are NOT to behave like T does when he visits!" and "This is how you treat a guest, even if it's awkward or rude."
Now, my son has known him for 6 months, and he's not as interested in playing with him. We never limited his playtime, but he found other kids who have better manners and are more fun to play with, so he sometimes even avoids T, which is ok by me as long as he's not rude about it (allowing him to be rude to T reduces him pretty quickly to T's level, IMO).
Good luck--sometimes neighbors are hard to escape!! :)