Yes, $user>id would contain your id.
But it seems like you are inserting new records into the _user table outside of Moodle. If so then $user>id won't help you. What language / platform are you using to do these inserts?
Using id+1 to get the "next" id sounds dangerous - what happens if, on a busy site, somebody else adds a new user in Moodle between the time that your application gets the next id+1 value and when it does the actual insert on the _user table? That other process might have already "taken" the id that your application has "reserved" for your insert. Your app would then not be able to do the insert with that id that's already been taken. That could be what is happening in your case...?
But what database engine are you using? Auto number fields normally mean you don't have to do the "id+1" thing to get the next available id. Autonumber means that the database engine should automatically get the next id when it's doing the insert and use that id - at least, on MSSQL it does.
Are you aware that when creating Moodle users directly in the Moodle database you need to create the associated records in various other tables at the same time. Are you doing this - or are you only inserting data into the _user table? The _user table is not the only table that stores user profile info.