Is the economy a zero-sum game? Theoretically speaking, if all the Earth's inhabitants were to save money and invest, is it possible for everybody to get, let's say, a 4% yearly return for everyone?

Is the economy a zero sum game (where if someone gains, others lose) or not?
Certainly the economy is not a "zero sum game" (whatever that means). There has historically been a positive aggregate net return on capital investment - there doesn't have to be a loser for every winner.

That said, economists generally believe that as the stock of aggregate savings increases, the return will go down; this is a consequence of diminishing returns to capital. Hence it's not possible for everyone to save an unlimited amount at 4%.

To be a little more concrete, economists often use a constant-returns-to-scale production function $F(K,L)$, taking capital $K$ and labor $L$ as inputs, as a first-pass way of thinking about the world. In this simple model, net aggregate savings equal capital $K$. Holding $L$ constant, the extent to which more $K$ will push down the net return to capital $r=F_K-\delta$ (where $F_K$ is the marginal product of capital and $\delta$ is the depreciation rate) depends on the elasticity of substitution of the function $F$. 

With a high elasticity of substitution, $K$ can increase substantially without $r$ falling very much, as the economy continues to find productive applications for capital despite its relative abundance; with a low elasticity of substitution, a rise in $K$ can result in a large drop in $r$.



Example. A common form for $F$ is Cobb-Douglas, which corresponds to a constant elasticity of substitution of 1. If the gross capital share of production is $0.35$, then we write $F(K,L) = K^{0.35} L^{0.65}$. The marginal product of capital here is $F_K(K,L) = 0.35 \cdot (K/L)^{-0.65}$, implying that the elasticity of $F_K$ with respect to $K$ is -0.65.

Now, if we suppose that initially $r=0.04$ and $\delta=0.06$, then the elasticity of $r=F_K-\delta$ with respect to $K$ is $-0.65\cdot (0.1/0.04)=-1.625$. This means that if we increase capital $K$ by 10%, the net return $r$ will decrease by approximately 16.25%, or $4\times .1625 = .65$ percentage points, from 4% to 3.35%. This is a pretty substantial decrease!

Indeed, since $1.625 &gt; 1$, in this case net capital income $rK$ to capital decreases as $K$ goes up; remarkably enough, if savers accumulate more, they earn less, as the decline in the net return per unit of capital overwhelms the increase in capital.