This is a topic which basically affects every multi-user application. You can have different users editing the same data item at one time. There are 2 solutions to it:
Optimistic locking: This is pretty much what you have implemented, using a version number on each data item. When you save your data item after editing, you check that the version number in the database is still the one you have loaded. If it's not, it means someone has updated the item in the meantime, so you will show an error message to the user, and they will have to reload the data item and reapply their changes.
This solution works well for cases when the probability of concurrent change is small, and for when the changes to an item are relatively small, i.e. the user would not lose a couple hours of work if someone changed their edited data item.
Edited: To be more specific to your actual case: I don't see a problem with exposing version numbers, as they are not confidential information. You would return them as part of the edited row so there wouldn't be any performance impact either.
Depending on how public your API is, and how much you trust your clients, you could work around revealing IDs and Versions it by creating temporary aliases, and storing them in a table or cache. So the client would get ID abcd, which internally to you maps to Database ID 1 and version ID 3. However you'd have to do this whenever you return a list of records to the client, from which they would choose which one they want to edit, so it would be a big overhead.
Pessimistic locking: You would implement a lock service, and would call it to obtain a lock on your data item before being able to edit it. After saving you would release the lock. This means that only one user can edit the item at one time.
However it comes with certain drawbacks. For one you need to implement the lock service, then you have to implement some timeout mechanism, for the case that someone starts editing something and then goes home or on holiday. You might also need a way for an administrator to release locks manually on data items, if there are locks waiting for a timeout, but the users need to work on them urgently.