Royal artist’s anger over exhibition of ‘sexually explicit artwork’ in gallery used by children