If your classifier is only trained on two types of images such as cats and dogs, then you should only use it on pictures of cats and dogs. If you use it on any other picture, it will still predict cat or dog.
If you want to make a classifier for cat / dog / anything else, then you need to add a third category with pictures of things that are not cats or dogs.
Usually this category will have many more pictures in it than the other two categories (since there are lots of things that are not cats or dogs), causing a class imbalance. I'm not sure if Create ML can compensate for that imbalance.