くれぐれも夢と思うて忘れるでないぞ and しかと帝にお伝えせよ are both what the empress said in the dream. While ~でないぞ is a strong negative command from superior to subordinate, the speaker uses polite forms(ました, のです) to the listener, so this can't be the speaker's words.
思うて is originally a classical form of 思って, and still used as dialect mostly in Kansai region, but it's used to show the speaker's (= empress's) dignity there as same as other classical expressions. This -te form 思うて/思って is a continuous usage or expresses the reason of the following clause, thus, it's not the object of 忘れる. The object is what she said in the dream (or another interpretation "to convey it to the emperor" is also possible). ~でないぞ negates the whole preceding part, not just 忘れる part, thus, the construction is [夢と思うて忘れる (= you think this is just a dream, and/so forget it)]でないぞ. The empress actually said "Don't forget what I said(or to convey it to the emperor) because of your thought that this is just a dream." Incidentally, the object of お伝えせよ is also the dream itself. She said "Convey surely what I said in this dream to the emperor".