Nevermind, I managed to do it somehow. If anyone would be in need of something similar, here's my code:
figure
pcolor(x,y,Z);shading interp; colormap jet;axis square off
h_ax = gca;
h_ax_line = axes('position', get(h_ax, 'position'));
plot(X,Y,'g--');
set(h_ax_line, 'YAxisLocation', 'right', 'xlim', get(h_ax, 'xlim'),'ylim', get(h_ax, 'ylim'), 'color', 'none');
axis square off
Regards, Juraj