Some squat racks sell dip attachments separately so you can do them inside the rack. If you have a rack that is big enough for you to use two barbells that will fit on the safety arms with you in between them, then it’s possible. However, this isn’t the most effective way to perform dips. It would work until you get a dip station, which is the best choice.