Yes, a person can masturbate with almost anything. However, not a good idea to use random objects as they can damage the soft tissue down there.
Fingers, stuffed animals or pillows, shower/tub faucets, are probably the most common.
What are the skills of husband and wife sex
The most provocative sex positions
How to practice safer sex
Is MFF’s threesome as exciting as it seems?