The Welfare Reform Act allowed, but did not require, states to implement drug testing as a pre-condition to receiving Welfare. The only state that attempted it previously was Michigan. That law was struck down in 2000 as unconstitutional, based on 4th Amendment protections against 'unreasonable search' in that the Welfare recipient was being searched unreasonably. The court's ruling was upheld in 2003, and that was the end of it in Michigan.
So...
The state governments were given explicit permission to implement drug testing for Welfare recipients. The one court result to date held that it was a violation of 4th Amendment rights.
The answer to your questions are a) yes, I know what the 4th Amendment is; b) yes, the states have the right to regulate Welfare in this way; c) so far, the courts have indeed held that there is a 4th Amendment issue involved, and d) The Constitution and Bill of Rights do not 'give' rights to citizens. They deny the federal government the right to infringe on specific rights, but they don't 'give' rights to citizens. If you do not understand that, you do not understand the Constitution.
Welfare was indeed considered a 'right' until President Clinton's administration redefined it.
http://en.wikipedia.org/wiki/Welfare#United_States
It is, however, considered an entitlement. That means that if a person qualifies for it, they can't be denied it, which is very similar to a right. If it were not such, then states could refuse Welfare to whomever they liked, such as black people, or Jews, or unmarried couples, or etc, etc, etc.
I am not saying I am a fan of Welfare. But I think a lot of people who talk about it don't really understand what it is, how it works, or what rights citizens have.
As much as I understand the desire to make sure that people who receive Welfare are actually a) deserving and b) going to try to get off Welfare by finding work, I am unwilling to cast aside civil liberties in order to do so. It saddens me that both conservatives and liberals are quite often more than willing to wipe their butts with the Constitution when the outcome is something they desire to see.