The pronoun “him” clearly refers to the angel. The twenty-four elders and the four living creatures of Revelation 19:4 were in the proximity of the throne of God (Revelation 4:4, Revelation 4:6) and so able to fall literally before God. John, though, is no longer in heaven (Revelation 17:3; Revelation 18:1, Revelation 18:4, Revelation 18:21) and so could not fall before God himself. Thus, he opts instead to fall before the messenger of God. Presumably, to John’s mind, God and his messenger are conflated so that the worship due to God can be rightly shown to his messenger. We are familiar with this conflation from the world of politics where heads of state send emissaries to represent them, who in turn receive the honour due to the head of state.
10 Then I fell down at his feet to worship him, but he said to me, “You must not do that! I am a fellow servant with you and your brothers who hold to the testimony of Jesus. Worship God.” For the testimony of Jesus is the spirit of prophecy.