In the United States and Canada, poppy seeds are perfectly legal. This is because poppy seeds do not actually contain any of the alkaloids that are present in the fully-grown poppy plant. Opium poppy seeds are also the same seeds used on poppyseed bagels. So if poppy seeds were illegal, everyone who's ever eaten a bagel should be considered a felon.
However, the DEA in the US has recently embarked upon a campaign of intimidation against many seed suppliers, most notably Thompson and Morgan. Thompson and Morgan will no longer ship their Somniferum varieties to the united states because of this.
All is not lost though. You can still purchase seeds from a variety of online retailers, as well as from many gardening depots, hardware stores, and florists. You can also purchase poppy seeds from this site, and help support poppies.org.
Yes, ingestion of poppy seed bagels or poppyseed cake can indeed cause a false positive on a urine test for opiates. Ingestion of poppy seeds can result in a positive drug test as long as two days after ingestion. According to the myth-busting website snopes, "as little as a single bagel covered with poppy seeds could produce a false positive test for these drugs".