Good question! Thanks for passing it along. These are matters over which you can expect disagreement, especially in the scholarly community.
First, we know that all scripture is inspired and inerrant (2 Timothy 3:16), and thus there can be no "error" here. Surely the Holy Spirit was more aware of the appearance of a contradiction than us. He must therefore expect us to see the solution to this dilemma.
Second, the key to interpreting any text is to determine the kind of literature one is dealing with. This text in Revelation 6 is highly symbolic prophecy. The seven seals are a vision given to John which reveals certain aspects of the future. Thus, we are dealing with symbols and symbolic actions. When the fifth seal is broken, the writer "sees" all of the souls of those martyred because of their testimony assembled "under the altar." One can hardly view this as a literal event, but rather must view it as a symbolic revelation concerning future events in the end times. It does refer to the souls of the martyrs who are crying out for justice. But it is difficult to believe that they are all literally compacted under the altar. The point is that the spirits of the dead martyrs cry out to God for justice to be done, for judgment to be executed against the wicked (probably those who tortured, persecuted, and killed them). They are honored by being given white robes, and are encouraged by being told to wait a little while longer.
Several things do seem to be revealed concerning these "souls." These "souls" exist; they are alive in God's presence in some sense (which conforms to Philippians 1:23; 2 Corinthians 5:8 and Luke 23:43). They know of their existence, and of the future that awaits them, and their enemies. They are very aware of the fact that the wicked have not yet been brought to justice. They communicate their desires to God. God assures them that the wicked will be punished and, by inference, that their bodies will be resurrected and they will be rewarded. They are told to wait patiently ("rest") a little while longer. And during this "waiting period" they were given white robes to wear, a symbol of their faithfulness, and a token of their future hope. They were to rest until the full number of the faithful had been martyred (6:11).
How can a disembodied "soul" wear a white robe? The same way that a person riding on a black horse carrying a pair of scales can fix the price of wheat, barley, and wine (6:5-6); the way the sun becomes black and the moon turns to blood (6:12); the same way that rivers or trees clap their hands (Psalm 98:8; Isaiah 55:12). Symbolic language does not expect or require a strictly literal reading, but is more fluid and dramatic. The point of the symbolic language is a literal event.
There is also the theory that dead saints are given a temporary "spiritual body," until that time when their mortal bodies are raised, transformed, and joined with their spirit. Thus, some might view the white robes as the temporary covering of the souls of those who have died. This is the position taken by the Bible Knowledge Commentary:
"6:10-11. They will cry out to the Lord, asking how long it will be before He will avenge them. In reply each is given a white robe and informed that the Tribulation is not over and that others must be martyred before God's judgment on the wicked and deliverance of the righteous occurs at the Second Coming. This passage shows that the time period is the Great Tribulation, but not its end. Spirits without any substance could not wear robes. The fact that they will be given robes supports the concept that when believers die they are given temporary bodies in heaven which are later replaced by resurrection bodies at the time of resurrection (cf. 20:4)."
All-in-all, it seems that there are adequate explanations so that we do not need to feel this matter is a contradiction.