Yes, though it depends on the circumstances.
In the areas of the world where it is legal to purchase slot machines, it is just as legal to buy them pre-owned – in fact, some places (such as the US states of Florida and Delaware) require machines to be at least 20 years old before they’re purchased, making buying exclusively preowned machines a necessity.
However, as is the case in buying anything pre-owned, you run the risk of having the machine plagued with issues. It’s worth ensuring a slot machine is in working order before committing to buy a pre-owned model, unless you’re capable of fixing it.