Short answer. Yes. Article 1491 of the Civil Code disqualifies agents from buying the property whose administration or sale was entrusted to them, but it makes an exception: the prohibition does not apply where the consent of the principal has been given. With your genuine, informed consent, your agent may buy it.
What the law says
Agents, the property whose administration or sale may have been intrusted to them, unless the consent of the principal has been given
Civil Code, Article 1491 — Persons Who Cannot Buy. Read the full provision →
The general bar, and the consent exception
Article 1491 lists persons who cannot acquire certain property by purchase, and among them are agents, the property whose administration or sale may have been intrusted to them. Crucially, the same line carries its own escape: the disqualification applies unless the consent of the principal has been given. So your agent is not absolutely barred from buying what you engaged him to sell. What the law forbids is his buying it behind your back; what it permits is his buying it with your consent. Your approval, freely and knowingly given, removes the very reason the prohibition exists.
Why agents are restricted at all
The restriction guards against a conflict of interest at the heart of the agency relationship. An agent hired to sell owes you loyalty: he is supposed to get the best terms for you, the principal. If he could quietly become the buyer, his interest as purchaser, wanting a low price, would collide with his duty as your seller, wanting a high one. He would effectively be on both sides of the deal, negotiating against the person he represents. The prohibition prevents that self-dealing. Once you consent, however, you are no longer relying on him to protect you against himself; you have taken that judgment back into your own hands.
What makes consent effective
Because consent is what validates the purchase, it should be real, not a formality buried in fine print. Sensibly, it is informed, given with knowledge that the agent is the one buying, and specific to this transaction, and it is far safer in writing so it can be proven later. Consent extracted by concealment, or given without understanding that your own agent is the purchaser, is fragile and invites a challenge. The cleaner the consent, the more secure the sale. A vague or doubtful approval leaves the door open to an argument that the transaction fell within the prohibition after all.
The risk of skipping consent
If an agent buys the entrusted property without the principal's consent, the acquisition runs into the prohibition, and such a purchase is exposed to being set aside, on top of the agent's breach of his duty of loyalty. That is a poor position for everyone, including a buyer who thought he had a done deal. The straightforward protection is to secure your consent before the agent purchases, ideally documenting that you knew he was the buyer and approved the terms. Handled openly and with your informed agreement, the sale can stand; handled quietly, it is vulnerable.