The Prophet (s) is not negating that he is an Imam. The verse indicates that there are multiple Imams, and so the companions were confused. They said to the Prophet (s): aren’t you the Imam for everyone? They were under the impression that the Prophet (s) is the only Imam for everyone. So his response is aimed at teaching them there will be other Imams after him, but there will not be any other Messenger. He is the last universal messenger.