Is it possible to detect a transmitter that comes within a certan range?
It is absolutely possible, but, in my opinion, not practical. There a few issues with this approach. The first obvious one is that anyone wanting to commit a crime will simply remove or destroy this component.

Otherwise, the card you used only works at very close proximity. In order to make it work in a mall or whatever, it would need to be actively transmitting meaning it would need some sort of power source (battery) and antenna to transmit around saying it's active.

Bypassing that is again very easy: don't change the battery or remove it and it won't transmit. Then gun manufacturers need to build in special parts to house this electronics and battery/antenna too. 
Another way around is to wrap the gun in aluminium foil to act as a Faraday cage and again it won't transmit.

Someone could also make a DIY transmitter of this gun one and stick it in the purse or car of innocent non-gun-carrying people and get them in trouble over nothing.

An attacker could also sniff the signature of a "safe" law-enforcement gun and put it into their own.

For all these reasons, I do not think components inside the gun is a good detection approach.

If you want to go ahead with this anyway and try it, this project is a good starting point: http://www.openbeacon.org/ it is an open source active RFID badge and detectors for them.