I think it's polite to offer, but it depends on the circumstances. Often the incremental costs are small - if there's a spare bed, or seat in a car, for example. And often it suits the family doing the inviting to have their child happy and entertained by having a friend there. But if there are flights involved, or extra rooms, then you should definitely expect to contribute. And if it's more than you can afford, don't be afraid to say no.
We took one of DS's friends to a villa holiday in Italy - his parents (good friends of ours) paid for his flight, but we covered everything else (food and trips). We covered the cost of a bigger hire car (7-seater), but there was a spare bed in the villa anyway.
DD1 went camping with a friend (UK) - they wouldn't accept a penny, so we gave DD1 enough money to take them all out to dinner one night (plus spending money).
As others have said, these things need to be discussed upfront, and if you are trusting someone to care for your child for a week, you should feel comfortable enough to have that conversation.