I have some problems with understanding what is the difference between these two. According to 初級日本語, 間 refers to certain time frame whereas 間に refers to certain time frame within that time frame. Is it correct or am I missing something?
It is very simple:
A 間 B
All the time that A took place B was also happening. (I read my book while it was raining)
A 間に B
While A took place B happend. The nuance to appreciate is that B is an event that occurred (started & finished) at some point during the period A took place. It did not go on all the time. (While it was raining the post was delivered.)
The nuance is very similar to the difference between まで and までに
A まで B
Until A happens, B will continue, constantly (I was watching television until father came home)
A までに B
By the time A happens B will have occurred (started and finished, during the period defined by A まで; it could happend at any point but did not happen constantly. (I will finish my work by 5 o'clock. ie at some unspecified point during the period to 5'oclock)
I've summarized the following from a Dictionary of Basic Grammar which seems a little different from what you state. (Note that I'm not a native speaker.)
The time span in the clause before 間 and the main clause is the same, whereas the time span in the clause before 間に is wider than the time span of the main clause.
The period in which she became sick is a portion of the time when Yamada was studying in Paris. If 間に is replaced by 間 then the sentence becomes ungrammatical according to A Dictionary of Basic Grammar.