The principle protects one narrow category of information, a communication passed between spouses during the marriage, and it lets the spouse who made that communication decide whether it can be disclosed. It says nothing about a spouse's ability to testify about facts she observed independently, outside of any such communication.
Here, two different pieces of information exist. First, X's own observation, seeing Y leave the neighbour's house at 6 am, which she witnessed with her own eyes and did not learn from any communication by Y. Second, what Y actually told her afterward, that he had committed the murder, which is a communication made between the spouses during the marriage and which Y has not consented to being revealed.
Applying the principle to each piece separately, the observation is unprotected and X can testify to it, while the confession is protected and X cannot testify to it without Y's consent. A rule that bars her from testifying entirely, or that lets her disclose everything including the confession, both fail to track this distinction the principle draws.
So the correct answer is X is not allowed to appear as a witness to depose what was told by the husband to her, however, she can depose what she saw.
Testing what the principle would need to say for each option to hold shows where three of the four choices go wrong.
Since the principle draws a line between communications and observations, and only one option reflects that exact line, that option is the one that fits without needing any change to the facts.
Therefore, the correct answer is X is not allowed to appear as a witness to depose what was told by the husband to her, however, she can depose what she saw.