Yes, using a roaming SIM card in China is a perfectly legal way to access the internet without the usual restrictions of the great firewall. You can get prepaid SIM cards from Hong Kong and some other SE Asian countries and even the UK (CMLink) with a preloaded amount of data that can be used for roaming in China.
Using a VPN in China is not illegal, but using an unlicensed VPN is. But getting a licenced VPN involves a lot of paperwork and money.