Yes, cancellation and trip disruption cover typically still apply in these circumstances as long as the policyholder(s) are named on the booking documents.
In the event of a claim, you would need to provide documents to evidence the costs of the holiday booking as per the normal process, you can claim for your proportion of the costs only. Additionally, the person (for example, parents or grandparents) who paid for the holiday may be required to provide evidence of payment and written confirmation that the holiday was gifted to you.