Yes it's one of the few things which local authorities seem to deal with in the first instance (instead of their usual stock-in-trade response of "Sorry, the council can't help you with that. What is it you want?")
I had experience of this when a neighbour of an elderly relative died in just those circumstances (no relatives, no friends, no funds). The LA took control of the situation immediately and briefed a funeral director to collect the deceased and a funeral was arranged, paid for by the LA.