Short answer. Yes. Under Civil Code Article 933, since you did not own the item when the will was executed but acquired it later by onerous title, meaning you paid for it, you can demand reimbursement from the heir or the estate rather than receiving the legacy itself.
What the law says
if it has been acquired by onerous title he can demand reimbursement from the heir or the estate
Civil Code, Article 933 — A Thing the Legatee Later Sells. Read the full provision →
Why ownership at execution is the starting point
Article 933 works off a single reference point: who owned the item when the will was executed. If the thing bequeathed belonged to the legatee or devisee at the time of the execution of the will, the legacy or devise shall be without effect, even though it may have subsequently alienated by him. The logic is that a testator cannot meaningfully bequeath something the beneficiary already owns, so a legacy of your own property is treated as legally empty from the start, regardless of what happened to the item afterward. Your situation is different: you did not own the item at execution, so this bar does not apply to you at all.
What happens when the legatee acquires it afterward
The article then addresses exactly your situation, where the legatee acquires the bequeathed item sometime after the will was executed but before the testator's death. It draws a line based on how the item was acquired: if the legatee or devisee acquires it gratuitously after such time, he can claim nothing by virtue of the legacy or devise; but if it has been acquired by onerous title he can demand reimbursement from the heir or the estate. Gratuitous acquisition, such as receiving it as a gift, forfeits any claim; acquiring it by onerous title, meaning you gave value for it such as paying a purchase price, preserves your right to be made whole.
What this means for your purchase
Because you bought the item yourself, that is acquisition by onerous title within the meaning of the article, not a gratuitous acquisition. The legacy no longer transfers the item to you since you already own it, but the article does not let the estate simply keep the benefit of a purchase you made in good faith while your father was alive. Instead, it converts your right into a right to demand reimbursement from the heir or the estate, effectively for what you paid, rather than leaving you with nothing.
Why the gratuitous-versus-onerous line matters
The article draws its distinction around what you actually gave up to acquire the item. A gift costs the recipient nothing, so treating a gratuitously acquired item as forfeiting the legacy claim does not leave the legatee worse off; they already received the item for free from some other source. A purchase is different: you parted with money or something of value to get the item, and letting the estate keep that value while also withholding the legacy would leave you doubly out of pocket. Reimbursement is how the article keeps that outcome from happening, restoring what you actually paid rather than the value of the legacy itself.