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 建物.
But,
使用人用にと思って・考えて建てられた建物が離れのお屋敷なんです。
is a bit wordy, thus you omit 建物 and instead you put の.
This の is the same that the one in bold in the following sentence.
A: 誰のペンですか?
B: 私のです。