I am an attorney. Do not take this as creating an attorney-client relationship. I am just stating my personal opinion.
As lillycoyote and davidbetterman said, yes, it is still a federal offense to grow and sell any amount of marijuana even if you are legal under state law medical marijuana rules.
Having said that, the feds usually have guidelines and they won’t usually prosecute for growing less than a certain threshold size crop. I don’t know remember exactly what that amount is and it might be different in different parts of the country. If you have a medical marijuana grower’s permit or if you buy from someone who does the best way to find out is simply call up your state law enforcement agencies and ask them if they can tell you what size crop you can grow before the feds start looking at you seriously. You may have to call around for awhile, but you will eventually be able to get an answer. When I looked into this last year for a client, I just called the County Sheriff.
Remember, no one can promise you that the feds won’t bust you for growing an amount that is less than their threshold crop size. It is generally a safe bet, though, unless they bust you for something else.