I think it's absolutely fine, and can be a big help as well.
When my uncle died last year I didn't take DS as he was just 2yo at the time and it would have upset him a lot (I think), but my sister took my nephew (17mo) and he was just fine and it was definitely nice for everybody there to have a little toddler there. It was the first time a lot of the family met him too.
Not the same thing at all, but I was very heavily pregnant at my DP's GF's funeral, but it seemed to provide some comfort so a lot of people there. Sorry if this sounds weird.. (DS has his GF's name as his middle name).
(also what onimolap said, obviously)