I you are certain you won't touch the variables that are used for the sorting the you could work around this by using a const_cast like this:
MyClass tmpClass;
std::set setMyClass;
setMyClass.insert(tmpClass);
std::set::iterator iter;
iter=setMyClass.begin();
const MyClass &tmpClass2=*iter;
MyClass &tmpClass3 = const_cast(tmpClass2);
Alternatively, you could declare the members of the class that you intend to change as mutable.