If you worry about the mutability of your buffer, then in general yes, it's not "safe" to pass a non-const reference to your buffer into a function. As you noted, the function can modify any array element.
If the function is const correct (it accepts a const reference or pointer), then you can be fairly certain it won't modify your array by accident. A compiler will catch any attempt at modification. Of course, the function can cast away the const and do nasty things,
const here will offer some protection from Murphy, not from Machiavelli.
The only way to be absolutely positive a function won't modify your data is to not let it reference it. If you are genuinely concerned, you can just pass it a copy:
std::vector<int> data_we_want_to_keep(3); // ... std::vector<int> copy_of_data = data_we_want_to_keep; tenTimesVector3(copy_of_data.data());
Now the function will not be able to modify
data_we_want_to_keep itself, despite needing access to whatever values in that buffer.
Quite often though, code is written to be well behaved. If a function accepts a const reference or pointer to your data, you can be reasonably assured it will only read it.