Recently, I heard that China banned holding cryptocurrency and cryptocurrency transactions, so does that mean that having cryptocurrency in China would be a criminal offense? Moreover, why create such a ban in the first place?
Those might just be rumors or someone must have blown some action of china out of proportion. It is true that at the initial stage, china was not completely in support of cryptocurrency, but that does not mean that they have made it a criminal offense, the action they took was to look for a way to actually control it but trying to ban miners from mining cryptocurrency, but are they not the same people that have now finally declared a little bit of support for blockchain and then cancel their plan to ban mining.
They might not have fully supported it but that does not mean that at the same time they are going to make it like a criminal offense for those that are using it. The first thing they did as to make their stand known of not giving support yet.
As far as I know, China had made a statement that mining is ok in their country so the idea of China trying to ban mining is already cleared. I believe it is too far for China to ban cryptocurrency at their current state of how they support Blockchain tech, and even the government itself have plan to issue their own cryptocurrency. I wonder where does OP get that rumor since recently the atmosphere of Cryptocurrency in China is getting better.