Yes, this is a real problem for our plans of nation building.
STARDOCK - Add a notification that a "non-treaty unit has entered your lands". The game does it for monsters, so it should not be that hard to program into the game.
Consider also, the AI is so easy to beat, that this behavior helps them.
--How I've dealt with this.--
Scroll out in the cloth map mode. Far enough that only unit icons are shown. Now you can see any enemy unit in your lands easily. Monsters sometimes blend in with the terrain, so this solves that problem. For when they are right next to your border, but have not crossed yet.
Scrolling out like this before you hit the end button, will allow you to see the movement of units, making it much easier to see incoming threats.
More to the point. Look for choke points. Park a low cost unit there and don't move them. In my current game, only 8 scout units are required to completely seal off my empire from AI units not at war with me. This seems unrealistic to me, (hum, isn't this a fantasy game), but it solves this problem.
If there is no choke point, then placing a unit in their line of movement will cause their unit to not move for several turns. Do this especially if they are on one of your roads.
If possible, make more outposts to cover more land. The program seems to send the offending unit to the closest neutral land. So try to make that closest square be back where they came. The high tower upgrade for outposts helps a lot with this strategy.
Plan out city and outpost placement with this AI behavior in mind. Any city at a choke point should be developed to seal off that choke point ASAP. This also helps when at war. The AI will bypass a heavily defended city and move into your interior.
This "irritation in my perfect world" by the AI settlers is the number one reason I have declared war on the AI factions so far.