Portugal is confident its troubled economy won't cost it an investment grade rating, an official told CNBC.