What is the easiest way to check what was the balance of address X at block Y? (without 3rd party services) I need to have a possibility to check balance on every address. So far I tried used getreceivedbyaddress, but as far as I understand with this command I can check only addresses which I have in my wallet, right?

I also found information, that to have a possibility to analyze transactions of others I need to set txindex=1 in my bitcoin bitcoin.conf file. I read that this will help me with getrawtransaction which will be able to get me details about any transaction. Does txindex=1 will also help with getreceivedbyaddress?

and last, but not least... how to check balance of particular address in the past? Can I use getreceivedbyaddress &lt;address&gt; 100000 where 100000  would be amount of required confirmations, so I would check 100000 blocks in the past?
As you have rightly mentioned getreceivedbyaddress does not return a value for non node addresses, i.e. the addresses which are not in your nodes wallet. 

txindex=1 in the configuration file followed by restarting bitcoind with -reindex parameter creates indexes for all the txs so that you can open them up with getrawtransaction and check the details inside the transaction.

The only way you can check for the addresses balance at any given block is to crawl all the blocks before the block under consideration and check each transaction's vout whether it contains the address under consideration. Also you will have to check whether any of the vouts you just went through have not been spent which would decrease the balance accordingly.