Yes, if the part is printed and finished for it. Standard prints have tiny gaps between lines and layers that let water seep through. To make a part hold water:
Print with more perimeter walls and a little extra flow so the lines fuse.
Use higher top and bottom layer counts.
Print a little hotter so layers bond well.
Seal the inside with a coating such as epoxy for anything that must stay watertight.