Is system boundary part of the system, the environment, or neither? The book says:

As an example, imagine a force applied to an object in empty space. We can define the object as the system and its surface as the system boundary.

Okay, if the surface of that object gained some energy, is the system who gained, the environment, or neither?
 A: Often it does not matter, because surface is so thin its energy is negligible. For example, gas in a thin walled metal cylinder has energy that is orders of magnitude higher than energy of the metal cylinder.
In case energy of the surface is important, one has to decide if it counts towards the system, or the environment, or if one wants to count it separately. There is no hard rule, one can choose.
If one wants, one can count the surface layer as a separate body and its energy as separate quantity. But one can also count the surface layer as part of the environment and its energy as part of environment's energy.
It seems to make sense to attribute the surface contribution to that part whose state also changes when the surface changes. For example, surface tension energy of liquid droplets is usually counted as part of energy of the liquid, because presence of the surface changes pressure in the liquid, but hardly makes any pressure difference outside in the gas phase. For solid/air interface, the boundary changes organization of the solid particles near the boundary, but hardly changes the gas outside so again the surface belongs to the solid.
A: Okay, if the surface of that object gained some energy, is the system who gained? or the environment or neither?
When applying these concepts in thermodynamics, generally speaking the boundary between a system and its surroundings provides the mechanism for transferring work and/or heat between the system and its surroundings. So for that purpose you can think of the surface as separate entity, but it is simply a geometrical concept to differentiate your object (the system) from its surroundings (you and everything else not part of the object) and to facilitate the exchange of energy between the system and its environment. 
For example, suppose your object (the system) is a sponge ball. So in this case the boundary of your system (geometric surface of the ball) is able to expand or contract. That allows for the possibility of work transfer.  An example would be you squeezing the sponge ball. You are the surroundings for the system (sponge ball). You, the surroundings, do work on the sponge ball increasing its internal energy (perhaps its temperature rises if you squeeze it vigorously enough). 
For this example, the environment (you) lost energy and the system (sponge ball including its surface) gained the energy, and the boundary (surface of the sponge ball) facilitated the transfer.
Hope this helps.
A: The most fitting answer would be that it belongs to neither the system nor the environment. As used in sentences like the one you cite, it is a mathematical abstraction representing an endlessly thin 2D object. The physical properties of a mechanical system (and its environment) are defined for 3D objects, made up of particles. So, when using this meaning, it is impossible for the surface to gain energy, or "do" something else that the system would do. It is an imaginary mathematical concept, not an object in the real world. 
This does not contradict Ján Lalinskýs answer, which tells you you can decide on your own if it belongs to the system or the environment. In that answer, the definition of the surface is somewhat different - for that, you pick a very thin (but still 3D) part of the world where the system and the environment meet, and call it "the surface (layer)". But from the language in your book, it is very likely it talks about the other, abstract meaning of "surface". 
