Yes, but it is difficult and you have to work at it.
The magnets in those sets are held firmly in place, and getting one out without damaging the surrounding piece takes patience and a careful touch. Prying with a hard tool is how people end up with a cracked brick rather than a loose magnet.
A practical warning that matters more than the difficulty: small magnets are a serious hazard if swallowed, particularly for children and pets, and damaged sets that release them should be taken out of circulation entirely. If the goal is simply to stop them sticking, removing the whole magnet holder is safer than trying to extract the magnet itself.