Construction of a surface integral under local Malliavin assumptions, and related integration by parts formulas