Gavin Ross made "sexually explicit noises" towards a Perth Prison officer while he was heading to court for a separate sex offence.