The SNP’s deputy leader says it is “very difficult” to see how the ex-finance secretary can continue to serve as an MSP.
Derek Mackay resigned from his cabinet post and was suspended from the party following allegations he messaged a 16-year-old boy hundreds of times.
Keith Brown said any decision to quit as the MSP for Renfrewshire North and West would have to come from Mr Mackay.
He said the party could not force him to step down as an MSP.
It emerged on Saturday the teenager had spoken to police about the messages.
Speaking on the BBC’s Politics Scotland programme, Keith Brown said it was an extremely serious situation for the boy and that it was being treated “very seriously” by the Scottish government and the first minister.
He said: “I think it’s very difficult to see how he can continue but it is his decision.”
He added: “As for Derek Mackay’s own future, that’s something that only he can decide. It is not something over which the SNP or the government have any control.
“As things stand Derek Mackay is a suspended member of the SNP and there will be a process through which we will have to go and I think it’s better that I don’t comment on that just now. “
Mr Mackay resigned as finance secretary hours before he was due to present the Scottish budget.
It followed claims, first published in The Scottish Sun, that he had sent 270 messages to the 16-year-old boy over a six-month period on Instagram and Facebook.
The youngster has since told the paper he has spoken to police about the messages.
He said: “I didn’t think what he was doing was a crime, but I knew it was wrong and should be highlighted.”
Police Scotland said they had not received any complaint of criminality, but were currently assessing available information.
Mr Mackay is reported to have called the youngster “cute” as well as offering to take him to a rugby game and out to dinner.
Mr Brown said events had surprised many people at Holyrood.
‘It came as a shock’
He said: “I wasn’t aware of his text habits and this communicating with people of that age.
“I was completely unaware of that and it came as a shock to people throughout the party. You could see the shock in people not just in the SNP, through the other parties as well.
“I have not spoken to him since.”
There is currently no recall process (where a member is effectively sacked as an MSP) at the Scottish Parliament except in cases where an MSP is given a custodial sentence of 12 months or more.
This means Mr Mackay cannot be forced to stand down.
Mr Brown also backed Public Finance Minister Kate Forbes to be the new finance minister following Mr Mackay’s departure.
Ms Forbes took on the task of setting out the government’s tax and spend plans for the next year on Thursday with just a few hours’ notice.
Mr Brown said: “I think everyone who watched the budget last week saw the performance of Kate Forbes. Everyone saw how well she handled that. The decision will be made by the first minister.”