Does the standard guarantee that order of equal elements will not change (eh, forgot the term for that) by using std::sort or do I need to consider an alternative solution
No it explicitly does not guarantee this. If you need to maintain relative ordering use stable_sort instead.
Documentation of sort which includes reference to equivalent elements