Load .js only if block is loaded Yes, something like that. If block and it's content are loaded in the page (so I guess detect by ID or something) it would load the .js, but if block is not loaded, it wouldn't load the .js.

I need this, because now each time when the block is not loaded, it still always loads the .js from theme in every page no matter what and that code interacts for some reason with other javascript elements like flexslider and it disables it for some reason and etc. Which is bad.

So it should load the .js only when the block is rendered/printed.
Depends on what type of block your need the js for. If it's a custom block you created in a module, you can just tack drupal_add_js into the block definition function. 

If your trying to add it to a block was created by someone else's module, or drupal created (IE, you didn't create it with a module), you could create a simple module that uses hook_block_view, which is fired whenever a block is loaded. You should be able to check from there if that is the block you want, then use drupal_add_js to load your js from that module.