Yes, if you sell the bond before its maturity, it’s possible that you would have to sell it at a discount.
If you bought a $1,000 bond with a 5% coupon, and a year later, the company issued new $1,000 bonds with a 6% coupon, you would not be able to sell your bond to someone else for $1,000 (obviously, because they would rather purchase the new bonds for $1,000 which pay more annual interest than your old one).
Therefore, you would have to sell your bond at a discount. This is part of the interest rate risk inherent to bonds.
What Happens to the Price of a Bond After I Buy It?
Can You Pay More Than Nominal Value for a Bond?