Sure, there are situations when you can use the possessive with a gerund. A gerund is a noun like any other:
As a dedicated vegan, I try not to comment on my friends' eating habits.
This works because "eating habits" is a well-known compound noun that just happens to start with a gerund.
Most of the time, however, the result is confusing or awkward. Your first sentence is a good example. "After my friend's becoming ..." is a complicated way to make what should be a simple, declarative statement.
Another example:
She appreciated her friend's welcoming of the new families into their community.
Again, "her friend's welcoming" is an inelegant phrase. In general, it's better to keep it simple:
She appreciated that her friend welcomed the new families into their community.
or rearrange it to use a more common noun:
She appreciated her friend's welcome of the families into the community.
This last option is something you can do with your example:
I joined the the company again in 2009 after my friend's appointment as the new manager of the company.
Side note: As in any language, there are many ways to say something in English. Different people have different writing styles and might prefer to use the possessive gerund to convey shades of meaning. For example, "welcoming" is also an adjective that means:
behaving in a polite or friendly way to a guest or new arrival
You might choose to write "her friend's welcoming" to suggest that this quality of her friend's personality, or just because you think it sounds better than "welcome".