This is possible. For example, this post provides a good explanation of the math involved.
The key point is whether an object lies in the planet's Hill sphere or the moon's Hill sphere:
Can the Moon have a moon?
Yes, the Moon could have a sub-satellite. If we look at a system of the Earth, Moon, and a sub-satellite, the same idea as above applies. The Moon has its own Hill sphere with a radius of 60,000 km (1/6th of the distance between the Earth and Moon) where a sub-satellite could exist. If an object lies outside the Moon's Hill sphere, it will orbit Earth instead of the Moon. The only problem is that the sub-satellite cannot stay in orbit around the Moon indefinitely because of tides.
As long as the gravitational attraction of a satellite is consistently stronger than the body the satellite orbits, a third body will orbit the satellite.
There are obviously limits to how small you can go with this, as gravity is a relatively weak force at small scales. At some level, either the Hill sphere is smaller than the object itself or other forces dwarf gravity's impact. For example, a person's gravitational field is too weak to attract its own satelite; the Earth wins that one every time.