I went outside to the lawn and urinated on it
Why would you pee outside?
I was trying to stop the neighbor's dog from pissing on it
I doubt that is going to stop the dog from peeing on your yard, and the scent might actually encourage the dog to come back. Really all that has happened is that you have let people see you peeing out in front of your house.
The dog would smell my urine and now that I own this yard and not pee on it anymore.
I hope that you understand that dogs are just following their natural instinct to communicate through the scent of their urine, and by peeing on your own lawn, you are probably encouraging the dog to come back.