Yes, a gift card should work. We use Family Sharing. I am the family organizer. I do have a valid debit card on file but we never have to use it since we all redeem iTunes gift cards on our individual Apple ID’s. I have always paid for the family iCloud Storage with an iTunes gift card.
As long as you have a balance that covers your purchases in your Apple ID, your debit or credit card will never be charged. The gift card balance will be charged first.
What bothers me a little bit about your situation because I don’t know the details, is that you may be required to have a credit or debit card on file.
You may want to contact Apple about the problem with your card. Use the link below and tap or click on Subscriptions and purchases and go from there.
Contact - Official Apple Support