An officer has been found guilty of assaulting a boy in a West Australian detention centre last year.