How can I allow multiple memberships for a single contact under one organisation?
The logic behind the behaviour you're observing is that most of the time when a contact is paying for a different membership type than their existing one, they are upgrading or changing that membership. Whereas an administrator is doing it, they can be trusted to differentiate between an update/change vs. a new one.
The link you provided suggests that if you create membership type A and B associated with different organizations, then the system knows not to change a membership, but to create a new one. That seems like a good idea, but it depends on your own details - the membership model in civicrm has trouble capturing all the possible nuances of memberships in real life.
Here's a link to one of my recent projects that provides support for multiple memberships:
https://socius.cpha.ca/civicrm/contribute/transact?reset=1&amp;id=2