Your credit or debit card credentials must be associated with the same country where you reside.
Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store.
Answer to your question is yes. You must have the same country for apple id and credit card