I have to respectfully disagree with the individual that made this claim. The fact is that it's very common for a perfect fifth to move to an octave; we see it all the time in the V–I progression!
The claim that this is wrong is likely to prevent hidden octaves (also known as "indirect," "covered," "exposed," or "similar" octaves/fifths). In short, these are perfect fifths or octaves that are approached by similar motion between two voices. But there are wildly varying rules for situations in which these fifths/octaves are okay:
- If neither the soprano nor the bass are involved, it's fine.
- If one of the voices moves by semitone, it's fine.
- If the upper voice moves by step, it's fine.
Not knowing the individual that shared this stipulation with you, I can't say which rule s/he prefers.
It's also possible this individual was referring to the fact that two voices "fuse" together when in perfect intervals, and the whole point of counterpoint is for these voices not to fuse together, but rather be independent. Perhaps they felt that two consecutive perfect intervals, even of different sizes, led to this fusing? But that's not a rule that I'm familiar with.