All the funerals I've been to have been for a large number of people; family, friends, friends of friends, that sort of thing. Same for the viewing at the funeral home or wherever it may be. Of course, you always have to be observant, there will be times during both where if you're not family or a close friend it may be wise to step out or just fade back.
The burial however, that's really reserved for family and close friends. That's an intimate event so I would pass in your case, unless there's a situation where you should be there comforting your friend. But if it's not a boyfriend/girlfriend or very close friend, that's probably not necessary or desired. All the burials I've been to have been extremely emotional and intimate, and I doubt it'd comfort anyone to know that they're being watched by others who might not be as moved.
That's my experience of course, and primarily with several deaths on one side of my family, so I'm sure there are some slightly varying scenarios out there. Viewings and funerals are often announced with the obituaries though, so they are typically a more public and open affair and not just for the select few who were the closest to the deceased.
In general though, viewings and funerals are usually open to just about anyone while burials are smaller and more intimate proceedings.
EDIT: I've never been to one of those funeral/burial combinations, but if that's the case here, if you've already been to a viewing and shown support and comfort to the friend then you're probably safe not going. I'm less clear on these though, having never attended one.