I say yes. I took a baby to a funeral; we knew the widower and he was happy (if that's the right word) to see DS there. I would say that if the baby is screaming then leave the service, but my DS slept through the entire thing, which was great for me.

As for what to wear, a lot of people stipulate "happy colourful clothes" but if not, wear something sombre. It doesn't have to be black; gray and white are also colours of mourning. Dark colours should be OK if that's all you have. My funeral plan stipulates that mourners MUST wear black because you're all going to miss me and mourn me properly. It also states DH and DS must wear mourning for at least 3 months, ideally a year. But most people aren't that dictatorial.