Generally, a domesticated dog marking its territory will simply encourage other domesticated dogs to add their own mark. I'm not sure this applies to feces, however, as urine is the primary means of territory marking.
It is possible that getting your dog to mark your yard will prompt the other dog to mark instead of defecating, as most dogs are seemingly indiscriminate about where they'll mark, but quite a few are very discriminating about where they'll defecate (as anyone who has ever suffered outside in freezing rain waiting for their dog to find "just the right spot" will attest!).
However, this will probably be more trouble than its worth. If this isn't an isolated incident, you'll have to have your dog mark the borders of your property regularly for there to be even a chance of it working.
You're better off using other means to try and prevent the other dog from seeing your property as a good location for relieving himself/herself.
The simplest solution is a fence. Even a small ornamental fence is likely to be a sufficient deterrent:
Alternately, you can plant something other than grass along the borders of your property. If it the vegetation is sufficiently dense, most dogs will pass it by (then again, we've had a dog trample the one large flower we have in the corner of our yard and deposit a "present" for us right on top of the bent leaves!).
You can also try something based upon a motion sensor, as woliveirajr suggested. There are motion sensor activated ultrasonic pest control devices that supposedly work on dogs, as a possible alternative to a sprinkler that might make you rather unpopular with your neighbors.