Can ancient people give names with the word "dragon" in them?

Yes,

They mainly avoid taboos.

Taboos are a requirement in Chinese history that one must avoid the "name taboos" of monarchs and elders.

There are four categories of taboo objects:

The first is the emperor. The names of contemporary emperors and previous emperors of the dynasty are tabooed, which belongs to the "national taboo" or "public taboo" at that time. .

The second is to taboo the name of the superior, that is, the subordinates must taboo the names of the superior himself and his fathers and ancestors.

The third is to avoid sages, which mainly refers to avoiding the names of the sage Confucius and the sub-sage Mencius. Some dynasties also avoid the name of the Yellow Emperor, the ancestor of the Chinese nation, and some even avoid the name of Zhou Gong. Avoid the name of Lao Tzu.

The fourth is to avoid elders, that is, to avoid the names of parents and grandparents, which is the "family taboo" or "private taboo" of the whole family.