Yes Cisco Emergency Responder must be upgraded before upgrading UCM. CER 10.5 will remain compatible with UCM 10.5 and UCM 9.0 both.
Cisco Emergency Responder talks to UCM via JTAPI. Once UCM is upgraded , Administrator should update configured UCM on Cisco ER Admin Utility to 10.5.