Can you unlock an iPhone 3GS 6.1.2 for T-Mobile?

I upgraded to iOS 6.1.2 and I have T-Mobile and I was wondering if
Ultrasn0w would work?

Yea it would if you need help just use YouTube university (YouTube.com) because YouTube teaches you everything

May not. What is important here is the baseband of the iPhone, not so much its iOS version. I'm going to assume you didn't take measures to preserve the lower baseband available prior to updating, so now it would be on a higher one than what ultrasn0w would be able to do anything with.

2 options aside from that but they may or will cost money.

1. The may cost money option would be to contact AT&T (assuming you are with them currently) & have them unlock the phone. They do this for off contract iPhones which this one should be.

2. The will cost money option would be http://chronicunlocks.com. $20 & the iPhone would be unlocked. You may to restore to complete it though, but once done it would factory unlocked, never lock again. Follow their instructions closely.