Accessory: something added to something else to make it more useful, attractive, or effective
Ornament: a small, fancy object that is put on something else to make it more attractive
These are the dictionary definitions of these words, so you can see the difference between them. The challenge might come when you see, for example in a department store, a section called "Accessories" to refer to things like jewelry or handbags which (you might think) are much more ornamental than they are useful.
An ornament is, in general, functionally useless. It just makes something look prettier. At this time of year, for example, we put ornaments on a Christmas tree to make it look nice, but the ornaments serve no useful purpose.
Meanwhile, something like a travel accessory might be a spare cell phone battery, or a portable sewing kit -- something that has some useful purpose. We would not usually say a "travel ornament". That doesn't make much sense (except perhaps in a humorous or insulting way).
"We must not take any of the ornaments inside" is an odd sentence, and I think we need more context to judge if it is correct, and if "accessories" can be used in place of "ornaments". Neither are usually the kind of thing you would keep outside in the first place.