The first instance of the と particle is the と-conditional and the second is the と-quoting particle.
I had been told to apologize to Kohaku but after having been told so, I strangely noticed that it would be embarassing.
Assuming 琥珀 is the subject of 聞いた and that 話 refers to the story that should be kept secret, a possible translation would be:
Even though Kohaku urges me to apologize, if she hears that story, she would realize something (ヘンに here suggests that what will be realized may not be entirely true and above all, it is not to the advandage of the speaker) and I would end up being in trouble.
Nevertheless, due to the lack of context, it is difficult to figure out with certainity who is the subject of 聞いた (琥珀 or just a someone) and whether 話 refers to the story that should be left concealed or to the apologies. But what is sure is that the subject of 聞いた and 意識して is the same.
In the second case, there is no room for hesitation, it is the quotative particle.
It expresses what the speaker think about the little detached shelter. And he says that he thinks that "since the mansion is not that spacious, the detached shelter has been built for the use of the servants of the house"
It could be rephrased this way:
EDIT: To answer Splikie's comment about のが. Here の is used as a device so as to say twice the same thing. You could safely replace this の by something like 建物.
is a bit wordy, thus you omit 建物 and instead you put の.
This の is the same that the one in bold in the following sentence.