Ты не должен говорить такие вещи, когда рядом дети.

English Translation

You shouldn’t say that kind of thing when children are around.

Doesn’t рядом require the instrumental case?

I’m not a native speaker, but I think that дети is the grammatical subject of the clause here, as the word “children” is in the corresponding English clause “… when children are near.” The instrumental (preceded by “с”) would be used if ты were the subject of the clause, as in “… когда ты рядом с детьми.”