Yes this is definitely doable. Do you have a link?
How are the images added? Are you adding them yourself (inline)? Or are they being automatically added through WordPress or a plugin? If you are adding them yourself, then you can create a CLASS in your css and add that class in your code for when you want the border to show up……which means all other images added without the class won’t show the border since the CLASS wasn’t added to them. Does that make sense?
If you need an example of what I’m referring to just let me know.