Of course it is. You just need a reference to the object of that class whose image you want to change.
For example, if an ActorA object intersects an ActorB object and you want to change the image of the ActorB object from the ActorA class:
Actor actor = getOneIntersectingObject(ActorB.class);
if (actor != null) actor.setImage(new GreenfootImage("newImage.png");