In Shulchan Aruch Yoreh Deya in kibad for one’s Rav there is mention of it not being appropriate to bath in front of one’s children. Today we always take our children to the mikvah with us. Why is this permissible?
The sefer Hilchos Kibbud Av Va-Em (siman 140) quotes from Rav Elyashiv shlita that the prohibition of bathing with one’s father (see Even Ha-Ezer 23:6) only applies where hirhurim are possible, and not below the age of 9-10. This is also suggested by Rav Chaim Kanievsky (Ma’aseh Rav, p. 73), who writes that many are lenient to bring young children with them to the mikvah.
Nonetheless, some write that it is not recommended (for various reasons) to bring children with them to the mikvah.