Yes, it's likely related to the plague. The lyrics seem to match plague symptoms and practices. The 'rosie' for the rash, 'pocket full of posies' for the flowers carried to deal with the smell, and 'ashes, ashes' for the burning of bodies. But it's not 100% certain as it could also be a children's rhyme that just coincidentally has elements that seem plague - related.
It's possible that it's related to the plague. When you look at the words of the rhyme, they seem to parallel the plague situation. For example, the red 'rosie' could symbolize the rash from the plague, and the posies in the pocket could be related to the idea of using flowers to counter the stench of death. But it's also conceivable that it's just a children's rhyme that has been misconstrued over time and doesn't actually have any real connection to the plague.
There's a good chance it is related to the plague. The 'ring around the rosie' part can be seen as the circular rash that plague sufferers had. The posies were a common way to try and combat the horrible smell during the plague. And the ashes part might be about the disposal of bodies. However, some scholars think it might be a misinterpretation and it could be a normal children's rhyme with no such morbid origin.