Re your question "with myself" i.e. alone.
Having completed the task, I was able to leave. = Because I had finished the task, I was free to go.
Such a locution implies that "I" had done the task alone. If you wanted to involve others, it would be:
Because we had completed the task, I was free to go. or Because we had completed the task, we were free to go.
There is no way to express that idea in the initial clause when it begins "Having completed" because there is no way of expressing differences in number with "having completed". The number will be in the second, independent clause:
Having completed the task, I was free to go.
Having completed the task, he was free to go.
Having completed the task, they were free to go.
Colonel Mustard, having completed the task, did you leave the premises immediately? Or did you stick around and murder Professor Plum in the living room with the candelabra?
I had a scar on my belly, having had my appendix removed as a child.
You cannot remove your own appendix. So you had it removed. That is, you took action to have another person remove it.
I will have the house painted before we put it up for sale.
means that you will hire someone to paint the house for you.
After having had the house painted, we put it up for sale but then decided to stay.
After having the house painted, we put it up for sale.