A and C are correct if the right answer is "which sentences mean the girl is wearing the dress."
Only D is really wrong.
The girl in the red dress
X in Y is used when Y surrounds X on a couple or more sides, or Y is a container of some sort. This means the same as "The girl wearing the red dress."
The girl on the red dress
X on Y is used when Y is flat and X is above it and making contact with it.
So this means the girl is sitting/standing on top of the dress, not wearing it.
The girl with the red dress on
On here is being used as an adverb to mean "physically in contact with and supported by a surface", which is also used to mean "that is being worn by her."
The girl with the red dress in
In can similarly be used as an adverb to mean "that is inside of X". Unless the word "girl" means "something that is shaped like a girl but can be used to contain items" this sentence won't make any sense since you cannot put a dress inside of a girl.