I'm not a lawyer.
Your question is rather vague. You don't mention location, not even what country.
But in much of the USA it matters if the title for the land says “undercover AND other owner”, or “undercover OR other owner”. In the case of “AND”, the signatures of both parties would be needed for a voluntary sale. In the case of “OR”, either party could sell without the consent of the other. Since land sales include improvements such as buildings, I'd say by default that the co-owner co-owns the new house.
In short, don't do it, unless said co-owner is your legally married spouse.