Yes, you can control depth of field with the help of aperture. With smaller apertures such as (f/22), you will get greater depth of field.
On the other side, it will give a shallow depth of field with larger apertures such as (f/1.4).