You specify that the place s is const, not the value it keeps. You can still do:
#include <string>
#include <iostream>
// not your code
void innocentF(std::string const& s) {
(const_cast<std::string&>(s)) += std::string(" I'm evil.");
}
// your code
int main() {
std::string const s("hello world.");
innocentF(s);
std::cout << s << std::endl; // hello world. I'm evil.
return 0;
}