Short answer. Yes. Article 501 of the Civil Code makes every co-owner liable after partition for defects of title and quality in the portion assigned to each of the other co-owners. If the portion received turns out to belong to a stranger, the affected co-owner has a warranty claim against all the others who participated in the partition.
What the law says
Every co-owner shall, after partition, be liable for defects of title and quality of the portion assigned to each of the other co-owners.
Civil Code, Article 501 — Co-owner's Warranty After Partition. Read the full provision →
The warranty that arises from partition
Article 501 establishes a straightforward obligation: "Every co-owner shall, after partition, be liable for defects of title and quality of the portion assigned to each of the other co-owners." This warranty runs from each co-owner to all the others — it is mutual and automatic. The moment the partition is completed, everyone who participated in it becomes a warrantor of every other participant's share. There is no need to insert a warranty clause into the partition agreement; the law creates it.
Title defects include third-party ownership claims
A defect of title arises when someone outside the former co-ownership successfully asserts a right that diminishes or destroys the receiving co-owner's portion. The clearest example — the one in your question — is when the allotted portion turns out to be owned by a stranger entirely. This is sometimes called eviction: a third party with a better right forces the co-owner out of what they were supposed to have received. When that happens, the evicted co-owner is not left without recourse. They can look to the other former co-owners for compensation under Article 501's warranty.
Quality defects are also covered
Article 501 covers not only title problems but also defects of quality in the portion received. This parallels the warranty against hidden defects in a sale. If the physical condition of the property assigned to a co-owner turns out to be substantially worse than what was represented or understood in the partition — for example, if the land is encumbered by a hidden easement or has a structural problem that makes it far less valuable than assumed — that too can ground a warranty claim. The defect must generally have existed at the time of partition and must not have been apparent to the receiving co-owner.
What the warranty claim requires and where it leads
To enforce the warranty, the co-owner who was assigned the defective portion must show that the defect was not known to them at partition, that it materially affects the value or usability of what they received, and that actual loss resulted. The remaining co-owners share the liability proportionately according to their respective shares in the partition. The goal of the warranty is to make the affected co-owner whole — to compensate them for what they lost because the partition gave them less than it should have. Whether the remedy is monetary indemnity or some adjustment of the partition itself will depend on the circumstances and what can practically be done.