I found another solution to this problem.
Dive in the temple, to find the cornett of waves/depths. Then, use it to open the 1st temple (with the boss inside). Killed the boss, and went deeper into the temple - which showed me the picture of some city. This made my quest continue (so it was as if Dereo hat ordered me to go into the ruins). Afterwards, all the pirates said, that I was sent by Dereo, and I was able to leave.