The short answer is "possibly".
You can find some guidance on this area from the statutory guidance to the Care Act 2014, specifically Annex E: Deprivation of Assets: www.gov.uk/government/publications/care-act-statutory-guidance/care-and-support-statutory-guidance#AnnexE
The crucial paragraph is this: Deprivation of assets means where a person has intentionally deprived or decreased their overall assets in order to reduce the amount they are charged towards their care. This means that they must have known that they needed care and support and have reduced their assets in order to reduce the contribution they are asked to make towards the cost of that care and support. (emphasis mine)
Arguably, paying for an extension to their child's home in order to allow them to live with that child would not be a deliberate deprivation of assets in order to reduce the amount they are charged towards their care. Instead, the purpose is to give themselves a place to live with family, which might be necessary if they anticipate needing more help or care from their child in the future.
However, if the extension was very large or went far beyond what was necessary to house one extra person, then perhaps the council would decide that this was in fact a deliberate deprivation of the assets, as it is effectively a large gift to the child. They might also decide that spending the money might be a deliberate deprivation if the anticipation of needing care is imminent - therefore the sooner you act, the better.
This will likely be quite fact dependent - what are the plans for the extension, how soon is the parent anticipating needing care, does the child have enough room already, etc - so perhaps it may be worth a quick consultation with a lawyer. That said, if you are sure that care is at least a few years away and the extension plans/cost is reasonable then I wouldn't personally see the need to rack up solicitors fees.
You mention needing to repay the funds - I am not sure what you mean. If the council decides that your parent has deliberately deprived him/herself of the money, then they can deem him to still have the money, i.e. treat him as still having the £50,000 in his bank account. Therefore he may have to pay the full charge for his care, but there wouldn't be any money to 'pay back'.