A betta can technically be kept in a quart container, but it is not ideal. Bettas need at least one gallon of water, preferably more, along with filtration and heating. A quart container restricts swimming, harms water quality, and causes stress and illness.
Upgrade to a larger, properly equipped tank as soon as possible.