Translation:They bought gifts for the family.
Yes. Spanish often uses some form of 'the' instead of possessive adjectives when it's clear from context to whom something (or someone) belongs.
This includes things such as close relations (los padres instead of mis padres) and parts of the body (la mano instead of tu mano).
If you do need to clarify, you can always specify whom the gifts are going to (nuestra familia, for example, or la familia de él).
I thought indirect object pronouns were generally used in Spanish even when the indirect object is specified in a prepositional phrase. Would it be acceptable or preferable to write this Spanish sentence using the indirect object pronoun?
"Ellos les compraron regalos para la familia."