It appears from these words that our forgiveness before God depends upon our forgiveness of others, so if we don’t forgive others does that mean we’re not saved? In a word, possibly.
You can’t lose your salvation, but it may be proof that you were never truly saved. The prayer recognizes that we have no right to seek forgiveness for our own sins if we are withholding forgiveness from others. Someone may have wronged you, but the Lord asks you not to forgive the sin/debt (because only He can do that), but to forgive the sinner/debtor, i.e. extend forgiveness to the person.
Assuming you are a Christian, you are obligated to follow the model given by your Lord, and He has forgiven you not based on any merit of your own doing. Thus, He wants you to forgive others, not because they’ve earned it, but because it reflects the gospel of forgiveness you enjoy.