I don't think there's a hard and fast definition. Foreground objects are in front of the object you are looking at and affect your viewing of the object.
An example, would be taking a photo of the Andromeda galaxy. The photo will be littered with foreground stars from our own galaxy and taking any measurements from the observation would require knowing what stars are what and how far away they are so that foreground stars can be eliminated. Parallax is often used to eliminate these stars as they will move depending on where we take our photo ie spring time vs fall time when we are at opposite ends of the Earth orbit.
View attachment 263845View attachment 263846View attachment 263847
Early universe objects are affected by lensing, dust clouds absorbing light, expansion ... and many other effects that must be accounted for to get your measurements.
Background objects
The Openstax online Astronomy may answer more of your questions.
https://openstax.org/details/books/astronomy