Yes being stressed out can make your cold last longer and also being stressed out can bring a cold on because your immune system is compromised when you're stressed out.
Being stressed out your body over time produces high levels of stress hormones and those high levels of stress hormones stop your immune system from working normally.
When your immune system is not working properly then your body cannot fight off viruses and infections which can result in you coming down with a cold or the flu and can make the cold or flu last longer.
So if you can you should try to lower your stress levels to both prevent a cold virus and to allow your cold virus to go away much sooner.