Can a foreigner make a purchase in App Store China?
It looks like that Chinese App Store accepts China UnionPay cards. If you have any Chinese bank debit card, you can pay for in app purchases easily.

As per Apple Support: 

China

If you're purchasing iCloud storage, an Apple Music subscription, or content from the App Store in China, you can use:

    Alipay
    China UnionPay
    Online banking2
    WeChat Pay
    Gift cards (including App Store Top-Up cards)

UnionPay and Chinese bank cards    
When you add UnionPay as a payment method, you must provide the mobile phone number your card's issuing bank has on file for you.

Some cards do not have mobile numbers associated with them. If this is the case with your card, contact your bank to update or replace it.

App Store Top-Up cards    
You can also redeem App Store Top-Up cards for store credit in China.