When extending into what is basically open territory, how far can you extend to increase your influence/moyo, without inviting an invasion?
Choosing the right distance for an extension basically depends on your goal in extending as well as the relative strength of stones in that area. Also, we need to differentiate between extensions to just explore open areas and extensions from existing walls.
Extensions from a wall
Let's start with the basics first. There is a well known rule of thumb, called the "wall plus one" rule. If you got a wall of height n, extend n + 1 spaces.
Assuming your wall has a height of 2. Consequently, the basic distance for an extension should be 3 spaces.
For a "wall" of height 1 (that is, a single stone), the safe distance is 2 spaces.
"Safe" means that is is difficult to invade and split your stones. The reason why it is safe is that you can either capture an invading stone, or at least connect your stones so you're not left with two weak groups. There are several midgame joseki that revolve around this, and the details will become more apparent as your reading grows stronger.
Extending further than wall-plus-one distance means your position is more open to invasion and typically leads to bad shape (it's difficult to fix the invasion point without becoming overconcentrated). On the other hand, extending less wide leads to immediate overconcentration. Neither is desirable, so especially beginners should heed the wall-plus-one rule.
Extensions to explore open areas
Sometimes, you simply want to extend along a side without having any kind of wall. In that case, the usual idea is to simply play in the center of the stones on that side (no matter whom they belong to).
This means that, since you intentionally ignored the wall-plus-one rule, your opponent will be able to invade and split you. However, since you played right in the center, you can simply extend to get a base (this leads to the concept of miai), while your opponent will be left with a single stone stuck between two relatively safe groups of yours.
Occasionally, you want to adjust the distance slightly, but this dives into the realms of tactics already.
Relative strength adjustment
The stronger you are, the further you should go, and the stronger the opponent, the more tight and defensive should you be. What does this mean in practice?
If your opponent is strong around, sometimes the wall-plus-one rule should be changed to wall-plus-zero, i.e. a tight extension. This means, in the classic sense of the word, overconcentration, but it makes for more safety which might be more important. Typically, this is chosen if the opponent already has a checking extension that interferes with your extension.
Extending further may provoke an invasion.
White can try to dodge, but is left without a base while black got extra points.
Compare to when there is no extra stone on the lower side.
On the other hand, if you're really strong somewhere, the correct distance is "as far as possible"; ignore the vast space and go right to your opponent's corner. If he dares to invade and split your extension stone, attack him and make him suffer by using your thickness.
There's an excellent and detailed answer already, but I want to throw in some other thoughts. I attended a workshop with Guo Juan (5P) where someone asked about the wall+1 rule and she explained that it's a nice mnemonic that works in some common situations (2-space jump between single stones, 3-space jump from 2 stones), but isn't much of a good rule past that. The point of a wall (a real wall, not a small 2-stone wall) is to attack!
If you have a big wall, you shouldn't try to make territory next to it, rather you should invite an invasion by making a moyo that threatens to become a massive territory if not invaded. Then, when your opponent invades, you attack. Even if you can't kill, you should make profit in a chase and come out ahead.
In your question, you ask about "increasing your influence/moyo without inviting an invasion." Without an invasion possibility, what you have is territory. Influence/moyo is invade-able, otherwise it would just be territory. What you really want to know (and @mafutrct's answer addresses very well) is how far to extend to make an invasion to your advantage.
The Sensei's Library page on this topic cites the wall+1 rule, but if you follow the link to the page about four-space extensions the biggest comment is about how rare they are, and no mention of a 3-stone wall is made.