If i buy a old domain on health insurance niche and has backlinks and directories related to health insurance. After that i will change its content and niche on some weight loss related product. will it be possible to get rank in google
I think yes if all old (even irrelevant from now) backlinks will still point for your domain name (site). But you will need to make new efforts to rich the new ranks
Your PR will likely drop drastically if not completely. The backlinks will help to get it restored, but I would suggest starting to build new (and relevant) backlinks asap.