Bans in the two countries, with youthful populations and expanding economies, would deal a blow to global online platforms’ long-term growth plans.