Can a result of (any) hash algorithm contain the hash result itself? Suppose you have a file of 240 lines. Any lines, any content.
You then calculate the hash of that file, let's say MD5, and the result is something in the following structure:

f8dbe310c1f61066d766071b07503ce8


Now, you take this hexadecimal digest, and add it to the file as line 241.

Rehashing the file (with additional hash line) will result with a new hash value obiously.

My questoin is whether it is even theoretically possible for a hash value to contain itself, meaning, can there be a file, with some content that its hashed value is identical to a string already presented in the file (e.g. line 241 in this example)
For the first question, about the last line, it surely depends on the hash function. For example, suppose each line is a single bit (0 or 1). If the hash function is the xor of the bits, then the answer is yes -- take 240 lines with total parity 0. But the answer is no if the hash function is defined by
$$f(x_1, x_2, \ldots, c_n) = \neg (x_n \oplus f(x_1, \ldots, x_{n-1})),$$
with $f()=0$, where $\oplus$ is xor. 

For the second question (about any line), I think @Yonatan's point in his comment was that if the hash function has finitely many possible outputs (as e.g. MD5 does), then, for a file that already contains every possible hash output (one per line), no matter what the hash outputs it will be in the file already.