I understand you're going to replace one existing block other block of the file. Then you can:
1) Create AcDbDatabase;
2) Read into this AcDbDatabase from dwg-file (using AcDbDatabase::readDwgFile() method);
3) Use the method AcDbDatabase::insert() to insert the block;
4) AcDbObjectId::swapIdWith () to switch between the new and the old block
5) Old block can be removed.
Something like that.