When you get new wheels, you are meant to aim to get a tire that makes the overall wheel and tire diameter be as close to the factory wheels/tires as possible. So long as you adhere to that general rule, you will be fine to keep your previous wheels as a spare. You should try to only use it as such though and aim to get the (new) wheel back on ASAP, but it's not going to be a massive issue if you continue using the stock wheel for any reason. With a larger variation in overall diameter, you will notice that your car may handle a little differently (eg. pull towards one side more), and may respond a little differently when braking. If the variation isn't overly massive, it's not exactly what I would define as dangerous, but I wouldn't say it's exactly safe either. In a condition like this, I would definitely only use a stock wheel as a spare for the least amount of distance you require it for.